我正在尝试让共享文件夹工作.每个人都应该具有读访问权限(当连接
Windows时,最好不会弹出密码提示),但是一些选定的用户应该能够登录并具有写访问权限.
到目前为止,我有以下配置:
[global] server string = %h server security = SHARE obey pam restrictions = Yes pam password change = Yes unix password sync = Yes syslog = 0 log file = /var/log/samba/log.%m max log size = 1000 [shared] comment = Shared path = /shared write list = @users create mask = 0660 directory mask = 0771 guest ok = Yes
虽然这可以很好地允许匿名用户访问共享(禁用密码提示),但它不允许我与经过身份验证的用户连接
smbclient //192.168.2.9/shared/ Enter cdecker's password: tree connect Failed: NT_STATUS_ACCESS_DENIED
解决方法
man smb.conf:
guest ok (S)
If this parameter is yes for a service,then no password is required to connect to the service. Privileges will be those of the guest account.
我想没有办法以这种方式完成你想拥有的东西.作为一种解决方法,我建议在不设置guest ok = yes的情况下定义另一个共享,并让认证用户在那里连接.
[shared-auth] comment = Shared path = /shared write list = @users create mask = 0660 directory mask = 0771