美文网首页
centos7搭建samba

centos7搭建samba

作者: 一剑仙人跪_ | 来源:发表于2020-04-16 18:25 被阅读0次

    下载

     yum -y install samba samba-common samba-client
    

    创建共享目录

    mkdir -p /var/ftp/share
    chmod 777 /var/ftp/share
    

    配置文件

    /etc/samba smb.conf

    # See smb.conf.example for a more detailed config file or
    # read the smb.conf manpage.
    # Run 'testparm' to verify the config is correct after
    # you modified it.
    
    [global]
        workgroup = SAMBA
        security = user
    
        passdb backend = tdbsam
    
        printing = cups
        printcap name = cups
        load printers = yes
        cups options = raw
    
    [homes]
        comment = Home Directories
        valid users = %S, %D%w%S
        browseable = No
        read only = No
        inherit acls = Yes
    
    [printers]
        comment = All Printers
        path = /var/tmp
        printable = Yes
        create mask = 0600
        browseable = No
    
    [print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = @printadmin root
        force group = @printadmin
        create mask = 0664
        directory mask = 0775
    [share]
            path = /var/ftp/share
            comment = samba
            public = yes
            writable = yes
            browseable = yes
            guest ok = yes
            valid users = ftp
            available = yes
    

    创建登录用户

    useradd -d /var/ftp/share/ -s /sbin/nologin ftp
    passwd ftp
    smbpasswd -a ftp
    

    启动

    systemctl start smb.service
    

    windows添加

    image.png

    相关文章

      网友评论

          本文标题:centos7搭建samba

          本文链接:https://www.haomeiwen.com/subject/qrpdvhtx.html