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


This is the output of /etc/groups


This is my smb.conf

      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

      comment = Home Directories
      browseable = no
      read only = no
      create mask = 0775
      directory mask = 0775
      valid users = %S

      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.

1 Answer 1


You are using tdbsam, so maybe you forgot to add user4 to samba's database

sudo smbpasswd -a user4
  • That was it, thank you very much. I had to delete the connection I had stablished with user3 by using the following command in the windows machine: net use \\server\share /delete, before I could connect with user4
    – Lando
    Sep 25, 2013 at 18:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .