[Samba] User Primary group problem

Craig White craigwhite at azapple.com
Wed Dec 7 00:30:29 GMT 2005

On Tue, 2005-12-06 at 14:08 -0600, Michael Barnes wrote:
> How do I establish both a user's primary NTgroup and Unixgroup when 
> creating a new user?
> Depending on the tool, I can set his NTgroup or his Unix group, but I 
> don't seem to be able to establish both with one tool.
> I'm having a little difficulty with creating users with the proper 
> groups.  My login scripts are based on the user's primary group.  When I 
> create a new user with usrmgr, I can set the Samba primary group but it 
> has no effect on the Unix primary group.  For instance, I have a user 
> John Smith who works in accounting.  In usrmgr, I create the user jsmith 
> and set his primary group as acctng.  He can login and the group is 
> mapped so he gets the right department drive, however, he has no rights 
> to files in the drive.  I check /etc/groups and he is listed as a member 
> of the acctng group.  I check pdbedit -Lv jsmith and see his group SID 
> is his personal group, not the SID of the acctng group.  I fix that with 
> pdbedit, but he still has no rights to files in the acctng drive.  A 
> quick check of /etc/passwd shows he is still in his own primary group 
> instead of acctng. I then have to go in via Webmin and change his Unix 
> group.
man smb.conf

Example: add user to group script = /usr/sbin/adduser %u %g


More information about the samba mailing list