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.


If a root user wants to verify that a user account is password-protected, which file can be used to verify this?

  1. /etc/passwd

  2. /etc/group

  3. /etc/login.defs

  4. /etc/shadow

The correct answer is: /etc/shadow

To determine if a user account is password-protected, the most appropriate file to check is /etc/shadow. This file is specifically designated for storing user password information in a secure manner, including hashed passwords and password expiration information. When a user account is password-protected, the relevant entry in the /etc/shadow file will contain a hashed version of the user's password. If the password field is empty or marked with specific characters, it indicates that the account does not require a password for login. The shadows file is only accessible by the root user and certain privileged processes to maintain security. The other files mentioned are not suitable for verifying password protection: - /etc/passwd contains basic user account information such as usernames and user IDs, but it does not store password hashes or any information about password protection. - /etc/group outlines the groups on the system, detailing which users belong to which groups. It does not have any information related to user passwords. - /etc/login.defs is used to define configuration settings for user account management, such as password aging policies and minimum password length requirements, but it does not provide information about individual user accounts or their password status. Therefore, /etc/shadow is the correct file to check for verifying