我在Debian机器中设置了Samba,以便
linux服务器中的现有用户可以使用
Windows连接到他们的家庭和不同的共享.
原文链接:https://www.f2er.com/windows/367780.htmluser1,user2和user3可以正常连接,但user4无法访问任何共享. user4可以使用SSH完美登录.
Samba在连接尝试失败时输出以下内容(使用user4凭据):
[2013/09/25 13:12:03.174008,1] smbd/service.c:678(make_connection_snum) create_connection_server_info Failed: NT_STATUS_ACCESS_DENIED
成功连接尝试后,Samba会输出以下内容(在同一台Windows计算机上使用user3凭据):
[2013/09/25 13:13:04.564410,1] smbd/service.c:1070(make_connection_snum) user-pc (::ffff:XXX.XXX.XXX.XXX) connect to service www initially as user user3 (uid=1001,gid=33) (pid 2046)
这是vipw的输出
user1:x:1001:1001:,:/home/user1:/bin/bash user2:x:1002:1002:,:/home/user2:/bin/bash user3:x:1003:1003:,:/home/user3:/bin/bash user4:x:1004:1004:,:/home/user4:/bin/bash
这是/ etc / groups的输出
www-data:x:33:user1,user2,user3,user4
这是我的smb.conf
[global] workgroup = WORKGROUP server string = %h server dns proxy = no log file = /var/log/samba/log.%m max log size = 1000 syslog = 0 panic action = /usr/share/samba/panic-action %d security = user encrypt passwords = true passdb backend = tdbsam obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . pam password change = yes [homes] comment = Home Directories browseable = no read only = no create mask = 0775 directory mask = 0775 valid users = %S [vault] path=/mnt/vault/ browseable=yes writeable=yes create mask = 0664 directory mask = 0775 valid users = user1 user2 user3 user4 force group = www-data
我不确定在哪里寻找这些用户之间的差异. user4最近创建,我不知道在这个过程中我是否忘记了什么.