DotLinux.net
Toggle Menu
Home
Topics
Linux Basics
Command Line
Shell Scripting
Networking
Security
Administration
Blogs
Latest Blogs
Quizzes
Disk and Storage Management
File System and Permissions
Linux Command Line Basics
Linux Environment and Variables
Networking Fundamentals
Package Management
Process and System Monitoring
Shell Scripting Basics
System Boot and Services
User and Group Management
Tools
Online Bash Compiler
About
User and Group Management
Check knowledge of managing users,groups,and access control.
1. Which command is used to create a new user account in Linux?
useradd
adduser
newuser
createuser
2. Which file stores default user creation settings such as default shell and home directory path?
/etc/default/useradd
/etc/passwd
/etc/login.defs
/etc/profile
3. Which option with the useradd command specifies the user's home directory?
-d
-h
-m
-H
4. Which command is used to modify an existing user's account details (e.g., shell, groups)?
usermod
useredit
usermake
userchange
5. In Linux, where are encrypted user passwords stored?
/etc/shadow
/etc/passwd
/etc/group
/etc/gshadow
6. Select all valid commands for managing user groups.
groupadd
groupdel
groupmod
groupedit
groupcreate
7. Which of the following files are involved in user and group management?
/etc/passwd
/etc/shadow
/etc/group
/etc/gshadow
/etc/fstab
8. Which options can be used with usermod to add a user to a supplementary group?
-a
-G
-g
-s
-A
9. Which statements about the root user are true?
Has UID 0
Can access all files on the system
Cannot be locked
Has no password by default
10. Which commands allow switching to another user account?
su
sudo -u
switchuser
login
user switch
11. The 'passwd' command can only be used by the root user to change passwords.
True
False
12. The /etc/group file stores information about user groups, including group names and member lists.
True
False
13. A user can be a member of only one primary group.
True
False
14. The 'chown' command is used to change the permissions of a file or directory.
True
False
15. By default, the 'sudo' command requires the user to enter their own password to execute privileged commands.
True
False
16. What command is used to delete a user account from the system?
17. What is the numeric UID assigned to the root user in Linux?
18. Which file contains information about user groups, including group names and GIDs?
19. What command displays all the groups a user is a member of?
20. What option with the useradd command ensures the home directory is created if it does not exist?
Reset
Answered 0 of 0 — 0 correct