User Management Flashcards
7 cards from real Linux practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 User Management flashcards as text
What command sets a user's account expiration date to January 1, 2025?
Answer: chage -E 2025-01-01 username
chage -E sets the account expiration date using YYYY-MM-DD format.
Which command creates a new group called 'developers'?
Answer: groupadd developers
groupadd is the standard command to create a new group on Linux systems.
What does the `/etc/skel` directory contain?
Answer: Template files copied to new users' home directories
/etc/skel contains template files (like .bashrc) that are copied into a new user's home directory at creation.
How do you add an existing user 'alice' to the supplementary group 'sudo' without removing her from other groups?
Answer: usermod -aG sudo alice
usermod -aG appends the group without replacing existing supplementary group memberships.
Which /etc/shadow field stores the number of days since epoch when the password was last changed?
Answer: Field 3
The third field in /etc/shadow records the date of last password change as days since January 1, 1970.
What is the purpose of the `newgrp` command?
Answer: Switches the active primary group for the current session
newgrp changes the current user's active primary group for the duration of the shell session.
Which command would you use to interactively change a user's password information including aging settings?
Answer: chage username
Running chage without options prompts interactively to set all password aging parameters for the user.