User & Permission Management Flashcards
7 cards from real LCA 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 & Permission Management flashcards as text
Which chage command sets the account expiration date for user 'bob' to December 31, 2026?
Answer: chage -E 2026-12-31 bob
chage -E sets the account expiration date in YYYY-MM-DD format.
What is the purpose of the /etc/skel directory?
Answer: Stores skeleton (template) files copied into new users' home directories
/etc/skel contains template files like .bashrc and .profile that are copied to a new user's home directory upon account creation.
A file is owned by root with permissions -rwxr-xr-x. A regular user runs the file. Under which UID does the process execute?
Answer: The user's own UID
Without the SUID bit, processes always run as the UID of the user who launched them, regardless of file ownership.
Which command removes user 'carol' and deletes her home directory and mail spool?
Answer: userdel -r carol
userdel -r removes the user account along with the home directory and mail spool.
What does the SGID bit do when set on a directory?
Answer: New files created inside inherit the directory's group
The SGID bit on a directory causes newly created files and subdirectories to inherit the directory's group ownership.
Which field in /etc/passwd specifies the user's default login shell?
Answer: Field 7
The seventh field (last field) in /etc/passwd defines the user's default login shell, e.g., /bin/bash.
A Linux administrator wants to force a password change on next login for user 'dave'. Which command achieves this?
Answer: chage -d 0 dave
chage -d 0 sets the last password change date to epoch 0 (Jan 1, 1970), which forces an immediate password change on next login.