Problem with GID being set to UID for Samba 2.2.2

Indulis Bernsteins indulis.b at au1.ibm.com
Wed Nov 7 02:17:02 GMT 2001


Tony- thanks for the quick reply, but it probably doesn't solve the 
problem  (I will try the force group=users tonight at home but that still 
won't explain where samba is getting nonexistent gid of 501 from..  501 is 
not a group in my /etc/group file!)

>On Wed, 7 Nov 2001, Indulis Bernsteins wrote:


>> indulis:x:500:500:Indulis Bernsteins:/home/indulis:/bin/bash
>> pbabern:x:501:502::/home/pbabern:/bin/bash
               ^^^^^ This is why the GID is being set.  Thats what its 
s'posed
>to do :)

The GID should be set by Samba to 502 not 501, and it is being set to 501 
in samba according to the logs.

>If you want to set a users primary group do it in /etc/passwd.  secondary
>groups are done in /etc/group

Yep understand & agree... but if you look at the "ls" output which I 
attached, you can see that the uid:gid for "New Folder" created by pbabern 
as a samba client has an owner:gid of pbabern:501 *NOT* 502!!! (i.e. group 
501 is not recognised by the system, & as it is not in /etc/group it 
doesn't print a group name!).  Here is the "ls" again

total 3
drwxr-xr-x    2 pbabern  501          1024 Nov  4 18:05 Desktop
drwxr-xr-x    2 pbabern  501          1024 Nov  7 11:34 New Folder
drwxr-xr-x    2 pbabern  user         1024 Nov  7 11:40 smb_prob
-rw-r--r--    1 pbabern  user            0 Nov  7 11:42 unix_touch

...and from the sbmd log file
smbd/uid.c:become_user(201)  become_user uid=(0,501) gid=(0,501)
                  ^^^               ^^^     should be 502 according to 
/etc/passwd

I created "New Folder" after I had deleted group 501, changed user pbabern 
to be in primary group 502 (as per the /etc/passwd), and kicked xinetd in 
the HUPs to force a daemon refresh (JIC). 

unix_touch was created after "New Folder", by Linux root after su - 
pbabern, then touch unix_touch.  I don't understand where 501 is coming 
from, gid=502 is what I *want* it to do! Is there anything that samba does 
that would cause it to cache gid=501 for user pbabern?

I can bodge my ownerships on the directories to make it work, but I'm 
trying to understand where samba is getting gid=501 from, when group 501 
has been exterminated from the system.  An interesting puzzle! 

Cheers,

Indulis
(in Perth)

PS maybe it is the Jean Genie... the so-called "Bowie Effect"?
PPS wanted to do a better joke tying together disintegration of group 501, 
the bugs bunny martian, spiders from mars, and 501 jeans but at this time 
of the day I'm witted out
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the samba mailing list