Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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

smbpasswd -a user4
share|improve this answer
    
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 '13 at 18:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.