I am implementing LDAP authentication against Samba 4 AD for admins login to our Linux servers.
I successfully configured PAM with
libnss_ldapd with auto creation of the home directories of the users. I am facing now the problem that users have their mapped samba
gidNumber as primary group which do not exist locally any way. The current situation is the
/home directory looks like this (notice the users primary group):
drwxr-xr-x 2 user 1005 4096 Okt 13 16:01 user/
The problem with the
sssd is that it requires a domain join to Samba 4 AD, which is not the case now and will not be at all. Since we have several hundreds of these Ganeti VM's, and most of them are very critical!
The admin login to these machines is allowed for admins (member of a specific AD group) and who have a signed SSH public key.
What I was asking for is to rename the group according to the user and automatically create these groups locally. I read somewhere it should be possible to rename them by using
rip map. But I have no idea how to do this. Creating the groups locally is secondary, since I will create an admin group and add them all to it.
The main question is:
How could the users primary groups be renamed from
Thanks a lot.