Why "useradd -g" do not update /etc/group ?

Solution Unverified - Updated -


  • Why "useradd -g" do not update /etc/group file ?

Add a new user by following command line:

# useradd -u 1000 user1

You can find in /etc/group, a new record of "user1:x:1000" is created.

Add a new group and a new user by following command lines:

# groupadd -g 1000 group1

# useradd -u 1000 -g group1 user1

There is no error but you can not find any information about user1 in /etc/group.


  • Red Hat Enterprise Linux All Versions

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content