Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to set up a samba server with access for users in the Linux (RHEL 6) "wheel" group. I am basing smb.conf off of the example here where it goes through the [accounting] example. In my smb.conf I have

    comment = temporary files
    path = /var/share
    valid users = @wheel
    read only = No
    create mask = 0664
    directory mask = 02777
    max connections = 0

(rest of the output from $ testparm /etc/samba/smb.conf is here). And

groups `whoami`

returns user01 : wheel.

When I use the following command from another machine (Mac OS) as the Linux user (user01):

$ smbclient -L NETBIOSNAME/tmp

it asks for a password, I hit return without a password, and get:

Enter user01's password:
Anonymous login successful
Domain=[DOMAIN] OS=[Unix] Server=[Samba 3.6.9-151.el6_4.1]
Sharename       Type      Comment
    ---------       ----      -------
    tmp             Disk      temporary files
    IPC$            IPC       IPC Service (Samba Server Version 3.6.9-151.el6_4.1)

But when I try

$ smbclient //NETBIOSNAME/tmp

I try typing the password I use for the Linux login, and get a bunch of stuff logged, including

check_sam_security: Couldn't find user 'user01' in passdb.
session setup failed: NT_STATUS_LOGON_FAILURE

(I can give more logging information if it would be helpful.)

I can't find a reference to more steps I need to add group users in the resource. Should I be manually adding samba users from the group somehow?

share|improve this question
What kind of account storage backend are you using? Samba does not directly read /etc/passwd but, rather, will use a backend such as "tdbsam" or "ldapsam" as documented here. So you would need to create "user01" in the user storage backend used by Samba. – Fred Clausen Oct 25 '13 at 13:44
I have passdb backend = tdbsam in the global settings. Looks like using unix groups will be less straightforward than I thought... Thanks for the reference. – beardc Oct 25 '13 at 14:29
From what I understand you have to create 1) create the system "user01" 2) Create the Samba "user01" in tdbsam with "smbpasswd -a user01" 3) Add "user01" to the system group wheel and then it may work. – Fred Clausen Oct 25 '13 at 14:50
Yeah, I was hoping setting 'valid users = @wheel' would extract the existing wheel group members, but appears it's more complicated than that. I was able to get one user working with smbpasswd -a user01, and there's only a handful of users anyways, so doing it one-by-one shouldn't be too hard. I'll just have to look into options to sync unix passwords now since it doesn't sync automatically. – beardc Oct 25 '13 at 15:08
You can use "ldapsam" as a central source for Unix and Samba to avoid having to sync up users. I will post an answer for the immediate problem shortly. – Fred Clausen Oct 25 '13 at 17:07

1 Answer 1

up vote 2 down vote accepted

The issue here was that the Samba user storage did not have the system user present. The solution, in this case was

  1. Create system user "user01" (already done)
  2. Create samba user with smbpasswd -a user01
  3. Add "user01" to the system wheel group

then the user is able to access the share. To avoid maintenance of two user databases you could consider something like LDAP.

share|improve this answer

Your Answer


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.