Change analysts' GID to 3200 while keeping its name.
Which command is appropriate?
groupmod -g NEW_GID GROUP changes an existing group's numeric ID. Existing file ownerships should be reviewed separately.
Detailed explanation
groupmod -n 3200 analystsIncorrect. -n changes the group name.
groupmod -g 3200 analystsCorrect. It changes analysts' GID to 3200.
groupadd -g 3200 analystsIncorrect. groupadd attempts to create a new group.
usermod -u 3200 analystsIncorrect. usermod -u changes a user's UID.
Try it yourself
An example you can run in a temporary verification environment.
groupmod --help | grep -E -- '-g,|--gid'Expected result
new GIDの説明行Key points
- groupmod modifies an existing group
- -g selects the GID
- Check file group ownership
Notes
- Environment: shadow-utils groupmod help / 状態変更なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Account record
Identity attributes such as a user ID, home directory, and login shell.
Group membership
Primary and supplementary groups used during permission checks.
Password aging
State and time limits that control password changes and account access.