RHEL Linux - Red Hat System Administration Practice Exam

Disable ads (and more) with a membership for a one time $4.99 payment

Study for the RHEL Linux - Red Hat System Administration Exam. Enhance your knowledge with flashcards and multiple-choice questions, complete with hints and explanations. Prepare for your certification!

Practice this question and more.


The useradd command is primarily used to what?

  1. Add a user to the /etc/passwd file

  2. Add a group to the /etc/group file

  3. Add a user to the superusers list

  4. None of the above

The correct answer is: Add a user to the /etc/passwd file

The useradd command is primarily used for adding a new user account to the Linux system, and it indeed modifies the /etc/passwd file, which is a fundamental file for user management. When you execute the useradd command, it establishes a new user and creates an entry in the /etc/passwd file that contains details like the username, user ID (UID), group ID (GID), home directory, and default shell. This action is critical for system administration as it allows users to log into the system with their unique credentials and access resources based on their permissions. While there are additional related files, such as /etc/shadow (for password storage) and /etc/group (for group information), the command's primary action focuses on adding the user to the passwd database. Hence, this makes the option regarding adding a user to the /etc/passwd file the correct answer.