On Saturday 09 October 2004 04:51, Bo Jacobsen wrote:
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.
useradd new_user -G '' (And specify in other arguments if needed...) Cheers, Leen