RHCSA User and Group Management Flashcards
7 cards from real RHCSA practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 RHCSA User and Group Management flashcards as text
Which field in /etc/passwd defines the user's primary group?
Answer: Field 4 (GID)
The fourth field in /etc/passwd is the GID (Group ID), which specifies the user's primary group.
What command would you use to change the GID of an existing group named 'developers' to 5000?
Answer: groupmod -g 5000 developers
groupmod -g changes the numeric GID of an existing group.
An administrator runs 'chage -M 90 dave'. What does this accomplish?
Answer: Sets the maximum days a password is valid to 90
chage -M sets PASS_MAX_DAYS — the maximum number of days a password remains valid before forced change.
Which file must be edited to set system-wide defaults for new user accounts such as home directory skeleton and shell?
Answer: /etc/default/useradd
/etc/default/useradd contains defaults like SHELL, HOME base, and SKEL used when useradd creates a new account.
What is the purpose of the /etc/skel directory?
Answer: Contains template files copied to a new user's home directory
/etc/skel contains template files (like .bash_profile, .bashrc) that are copied into every new user's home directory at creation.
Which command removes a user account AND their home directory and mail spool?
Answer: userdel -r alice
userdel -r removes the user's home directory and mail spool in addition to deleting the account.
A user's account shows '!!' in the password field of /etc/shadow. What does this indicate?
Answer: The account has never had a password set and is locked
'!!' in the shadow password field means no password has been set, leaving the account in a locked state.