Group ID Considerations

User Private Groups (UPG)

  • Some distributions (e.g., Red Hat–based) create a UPG for each user.
  • UPG GID = User UID.
  • Avoid creating GIDs in the same range as UIDs to prevent conflicts.

Reserved GID Ranges

  • Red Hat–based: GIDs < 500 reserved for system use.
  • Debian–based: GIDs < 1000 reserved for system use.

Creating System Groups

  • Use -r to assign a low (system) GID automatically.
groupadd -r alamgir     # create group
getent group sales      # verify group
grep alamgir /etc/group # verify group

Reminder : Plan GID ranges carefully to avoid clashes with UIDs and UPGs.


Group Naming Considerations

Recommended Rules

  • Start with _ or a lowercase letter (a–z).
  • Use 16 characters or fewer for best compatibility.
  • Allowed characters: letters, numbers, _, -.
  • Do not end the name with a hyphen -.

Why It Matters

  • Rules may not be strictly enforced by groupadd.
  • Non-standard names can cause issues with other commands or services.