ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 223 - XK0-005 discussion

Report
Export

A systems administrator received a request to change a user's credentials. Which of the following commands will grant the request?

A.
sudo passwd
Answers
A.
sudo passwd
B.
sudo userde 1
Answers
B.
sudo userde 1
C.
sudo chage
Answers
C.
sudo chage
D.
sudo usermod
Answers
D.
sudo usermod
Suggested 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.

How to Change Account Passwords on Linux

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

CompTIA Linux+ Certification Exam Objectives

asked 02/10/2024
Duc Hai
40 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first