Exam4Training

Which of the following commands will grant the request?

A systems administrator received a request to change a user’s credentials.

Which of the following commands will grant the request?
A . sudo passwd
B . sudo userde 1
C . sudo chage
D . sudo usermod

Answer: A

Explanation:

This command will allow the systems administrator to change the password of another user account in the system. The sudo prefix will grant the administrator the necessary privileges to perform this action, and the passwd command will prompt for the new password for the specified user.

For example, if the administrator wants to change the password of a user named tom, the command will look like this:

sudo passwd tom

The other options are incorrect because:

B. sudo userdel

This command will delete a user account from the system, not change its credentials. The userdel command removes the user’s entry from the /etc/passwd and /etc/shadow files, as well as deletes the user’s home directory and mail spool. This is not what the request asked for.

C. sudo chage

This command will change the password expiration and aging information for a user account, not its credentials. The chage command can be used to set or modify various parameters related to password aging, such as the minimum and maximum number of days between password changes, the number of days before password expiration to issue a warning, and so on. This is not what the request asked for.

D. sudo usermod

This command will modify various attributes of a user account, such as its login name, home directory, default shell, primary group, and so on. However, it cannot change the user’s password directly. To do that, the usermod command requires the -p option followed by an encrypted password string, which is not easy to generate manually. Therefore, this is not a practical way to change a user’s credentials.

References:

How to Change Account Passwords on Linux

How to Change a Password in Linux for Root and Other Users

CompTIA Linux+ Certification Exam Objectives

Latest XK0-005 Dumps Valid Version with 136 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version