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 file stores the encrypted password hashes for local user accounts on a Linux system?
Answer: /etc/shadow
/etc/shadow stores hashed passwords and password aging info, readable only by root.
What command changes the group ownership of a file named report.txt to the group 'finance'?
Answer: chown :finance report.txt
chown :groupname file changes only the group owner of a file.
A file has permissions -rwsr-xr-x. What does the 's' in the owner execute position indicate?
Answer: SUID bit is set
An 's' replacing the owner execute bit means the SUID bit is set, causing the file to run as its owner.
Which command locks a user account by prepending '!' to the password hash in /etc/shadow?
Answer: usermod -L username
usermod -L locks an account by inserting '!' before the password hash, preventing password-based login.
What octal permission value sets read+write for owner, read-only for group, and no permissions for others?
Answer: 640
640 = owner rw- (6), group r-- (4), others --- (0).
Which /etc/shadow field controls the maximum number of days a password is valid before it must be changed?
Answer: Field 5 (maximum days)
Field 5 in /etc/shadow specifies the maximum password age in days.
A directory has the sticky bit set (drwxrwxrwt). What restriction does this impose?
Answer: Users can only delete files they own
The sticky bit on a directory prevents users from deleting or renaming files owned by others, even with write access.