设置centos pub windows共享账户

smb://pub/



open run (win + r), input :

\\pub



dbedit -L # 查看已有的samba用户:

groupadd 组名 #创建组

smbpasswd -a 用户名 #添加一个samba用户(enter 输入密码)

/usr/sbin/useradd -g 501 用户名 # 添加一个Linux用户在pub上(samba用户必须有Linux账户)

usermod -G 用户名 # 给用户添加分组

chown xxxx file/folder #改变文件/文件夹权限

例如: xet 是1775, 表示与拥有者同组的人有所有权限,其他人只有读执行权限,而且本人才能修改自己的文件,其他人无法修改删除。

service smb restart # 重启samba 服务器, 有时候名字是smbd 或者其他的 常用命令的链接:http://blog.csdn.net/tg5156/article/details/8865775

etc/samba/smb.conf 设置注意事项(http://blog.sina.com.cn/s/blog_63c8c46401014uhx.html):

writable = no时,只有write list的用户可写。

同时配置writable = yes、write list时,write list无效。

public = no 可以设置访客密码


实在不行,设置所有文件夹为chmod 777。 若是设置了writable =no, public=no,


猜你喜欢

转载自blog.csdn.net/dieziyangfei/article/details/74001761