useradd does not add new group for newly added user

Solution Verified - Updated -

Issue

useradd does not add new group for newly added user

  • User was added without specifying any parameter:

    # useradd bob
    
  • When adding new user accounts, no new group was created.

  • The new user account was created with primary group gid=100(users)

    # id bob
    uid=1002(bob) gid=100(users) groups=100(users)
    
  • Below log message has been recorded in /var/log/secure:

    useradd[34648]: new user: name=bob, UID=1002, GID=100, home=/home/bob, shell=/bin/bash
    

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9

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