I have setup Samba in a Debian machine so that existing users in the linux server can connect to their homes and different shares using Windows.
user1, user2 and user3 can connect without problems, but user4 can't access any of the shares. user4 can log in perfectly using SSH.
Samba outputs the following upon failed connection attempts (using user4 credentials):
[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 outputs the following upon successful connection attempts (using user3 credentials at the same Windows machine):
[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)
This is the output of 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
This is the output of /etc/groups
www-data:x:33:user1,user2,user3,user4
This is my 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
I am not sure where else to look for differences between this users. user4 was created recently and I don't know if I forgot something in the process.