Linux Enterprise Linux 5.x / 6.x --- Useradd Default Options --- Query

harmandeep

VirTuaLiZaTioN Freak
Disciple
Below is USERADD man page excerpt :-

-n A group having the same name as the user being added to the system will be created by default. This
option will turn off this Red Hat Linux specific behavior. When this option is used, users by default
will be placed in whatever group is specified in /etc/default/useradd. If no default group is
defined, group 1 will be used.

I need info for the BOLD part, and please post after performing practically.
 
First of all r u installing linux on a vm if yes was there any user names given second thing if you want to add a user in redhat just go ahead and type useradd <username> then set passwd for it as passwd <username> now coming to the groups the user group will be created automatically if you want to edit a perticular user and add him to another group then edit the file /etc/group
 
You again need to recall First Post :--- I need info for the BOLD part, and please post after performing practically.

I don post theoretical junk here.
 
Have to say this is an interesting question for me to tackle first up.

I would have thought that it would go with group 1 i.e. bin on centos. But it turns out that if you delete /etc/default/useradd and run useradd -n it still goes with group 100 which is users! Don't know why that is the case. Is there some other file or environment variable that is taken into account as well?
 
Back
Top