9 Oct
2004
9 Oct
'04
02:51
Hi, I have a problem finding out how to add a user with useradd, without the user getting the default secondary groups defined by /etc/default/useradd (without editing the default or by manually editing the /etc/groups file).
Any suggestions.
Add the user using useradd and then edit /etc/groups and remove them from any secondary group they should not be in. If you are adding several users you could try using webmin or write a script which allows you to specify which groups the user is in.
Yes, editing the groups file is a way to do it, or one could just add the -G nogroup parameter. I just try to find a way to do it with the commands that are made for manipulating the user values. Bo