Users and Group Management Flashcards
7 cards from real 010-160 practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Users and Group Management flashcards as text
Which file defines default settings (like UMASK and EXPIRE) applied when creating new users?
Answer: /etc/default/useradd
/etc/default/useradd stores default values used by the useradd command, such as the default shell and home base directory.
What is the purpose of the /etc/skel directory?
Answer: It contains template files copied to a new user's home directory
Files in /etc/skel are automatically copied into the home directory of any newly created user.
How would you add an existing user 'alice' to an existing group 'developers'?
Answer: usermod -aG developers alice
usermod -aG appends the group to alice's supplementary groups without removing existing ones; omitting -a would replace all groups.
What UID is typically assigned to the root user on a Linux system?
Answer: 0
The root user always has UID 0, which grants superuser privileges on a Linux system.
Which command displays all groups a user belongs to?
Answer: Both A and C are correct
Both 'groups username' and 'id -G username' (without -n flag) display the groups a user belongs to.
What does a UID range of 1-999 (or 1-500 on older systems) typically represent?
Answer: System/service accounts
Low UIDs (1-999) are reserved for system and service accounts like daemon, bin, and www-data.
Which command changes the primary group of user 'bob' to 'marketing'?
Answer: usermod -g marketing bob
usermod -g (lowercase) changes the primary group, while -G (uppercase) modifies supplementary groups.