I have unix users authenticating to an PDC (via winbind) and want to have the primary group of those users a local unix group (e.g. www-data).

users have the group "domain users" with gid 10006 (as the gid winbind mapping)

idmap uid = 10000-20000
idmap gid = 10000-20000
winbind enum groups = yes
winbind enum users = yes
winbind use default domain = yes
winbind nested groups = yes

but want that the primary group is 33 for all users (www-data)

how to achieve that?


Assign the group to users on the pdc in this way

sudo usermod -g www-data foo_user
  • Note that this will change the user's primary group, which may be what the OP needs, but is not usually what people want. Sep 16 '20 at 0:19
  • Yes you're right .Maybe create an AD (not local) group with the same name and uid of www-data should be a clean solution. Sep 16 '20 at 22:51

Not what you are exactly asking but may be you could use Identity Management for Unix on your AD and then use ACL (setfacl) on you linux machine to allow access to the filesystem.


You should review this post as it mostly solved consistent uid/gid mapping for me

Configure Winbind to get User Info from Windows

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.