MathsGee is Zero-Rated (You do not need data to access) on: Telkom |Dimension Data | Rain | MWEB

0 like 0 dislike
304 views
How is a user’s default group determined? How would you change it?
| 304 views

0 like 0 dislike
useradd -m -g initial_group username

-g/--gid: defines the group name or number of the user's initial login group. If specified, the group name must exist; if a group number is provided, it must refer to an already existing group.

If not specified, the behaviour of useradd will depend on the USERGROUPS_ENAB variable contained in /etc/login.defs. The default behaviour (USERGROUPS_ENAB yes) is to create a group with the same name as the username, with GID equal to UID.

by Diamond (81,178 points)

0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike