标签:samba
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
标签:samba
原文地址:http://blog.51cto.com/13480443/2092671