[Samba] Any drawback in changing primary group of domain users ?

Rowland penny rpenny at samba.org
Thu Feb 25 08:58:55 UTC 2021

On 25/02/2021 08:16, Nicola Mingotti via samba wrote:
> Hi,
> In these days I am trying to do some polishing/tuning in my NAS
> and I focused my attention on a detail: all domain users have
> "Primary group" set to "Domain users".
> I don't like it much. I would prefer e.g. the user 'foo' to have
> by default as primary group 'g-foo'.
> Before I do systematic change to all my users I would like
> to know your opinion about this. Do you foresee any issue
> if I perform such a move ?

Why do you want to do this ?

I once tried doing this, just to see how it was done and it is very 

First you have to check that the group exists and create it if it 
doesn't, you will also have to give the group a gidNumber if you are 
using the winbind 'ad' backend.

Next you change the users primaryGroupID to groups RID.

Finally you must add the user as a member of Domain Users.

You would have to do this every time you create a new user.

Lot easier to just get used to all your users having the same group, 
this is Active Directory not Linux.


> Also, I can change the Primary group from Windows tools
> but i can't find a proper way of doing it from Linux.
> Any ideas ?
> bye
> Nicola

More information about the samba mailing list