1、安装
yum install samba -y
2、修改配置
编辑配置文件/etc/samba/smb.conf修改如下行:
101 security = user
279 # A publicly accessible directory, but read only, except for people in
280 # the “staff” group
281 [Public]
282 comment = Public Stuff
283 path = /public
284 public = yes
285 writable = yes
286 printable = no
287 valid users = samba
2、添加系统用户及密码
useradd -s /sbin/nologin samba
passwd star
3、添加smb用户,及密码
smbpasswd -a samba
New SMB password:
Retype new SMB password:
重启smb 即可。
etc/init.d/smb restart
关闭 SMB 服务:[确定]
启动 SMB 服务:[确定]
原创文章,作者:carmelaweatherly,如若转载,请注明出处:https://blog.ytso.com/187187.html