centos7.4安装samba服务

时间:2018-03-29 20:01:18   收藏:0   阅读:254
centos7.4安装samba服务

[root@localhost ~]# cat /etc/redhat-release
[root@localhost ~]# systemctl stop firewalld.service
[root@localhost samba]# systemctl disable firewalld.service
[root@localhost ~]# sed -i ‘s@SELINUX=enforcing@SELINUX=disabled@‘ /etc/selinux/config
[root@localhost samba]# setenforce 0
[root@localhost samba]# yum install samba samba-client -y
[root@localhost samba]# cd /etc/samba/
[root@localhost samba]# cp smb.conf smb.conf.bak
[root@localhost samba]# vim smb.conf
[global]
        workgroup = workgroup
        security = user
        passdb backend = tdbsam
        server string = Samba Server Version %v
        log file = /var/log/samba/log.%m
        max log size = 50
[shared]
        comment = This is a directory of shared
        path = /shared
        valid users = zs
        browseable = yes
        read only = yes
[root@localhost samba]# mkdir /shared
[root@localhost samba]# echo "shared" > /shared/1.txt
[root@localhost samba]# chmod 777 /shared/
[root@localhost samba]# useradd -s /sbin/nologin zs
[root@localhost samba]# chown -R zs:zs /shared/
[root@localhost samba]# smbpasswd -a zs
[root@localhost samba]# systemctl start smb.service
[root@localhost samba]# netstat -tlnp |grep smb

windows客户端访问samba服务器ip
技术分享图片
技术分享图片
技术分享图片

原文:http://blog.51cto.com/13480443/2092671

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!