Thursday, May 10, 2007

Samba isn't anti-social, it just has it's own groups

I just spent at least 15 minutes trying to debug a simple problem with Samba. The issue is that I had a share set up like the following:
[test]
comment = Test Share
path = /volumes/local/test
writable = yes
public = no
browsable = no
force group = users
valid users = drew
It looks pretty standard, but there's a gotcha. I listed the shares and it didn't show up, as I planned so I tried to connect to it directly and got the cryptic
tree connect failed: NT_STATUS_NO_SUCH_GROUP
Now I find that odd since I am a member of a group which exists and is named users.

Apparently there are some issues with this version of Samba on stand-alone servers. If you look in your logs you'll see things like this:
[2007/05/10 15:43:40, 0] auth/auth_util.c:create_builtin_administrators(785)
create_builtin_administrators: Failed to create Administrators
[2007/05/10 15:43:40, 0] auth/auth_util.c:create_builtin_users(751)
create_builtin_users: Failed to create Users
Apparently Samba has it's own special groups for Users and Administrators. Since it can't create them properly it doesn't have the built-in and thinks the group doesn't exist. Using any other group name works fine.

The moral: Don't use "users" or "administrators" as groups in Samba if you want to refer to the system groups. Hope this helps someone.

No comments: