exam questions

Exam XK0-004 All Questions

View all questions & answers for the XK0-004 exam

Exam XK0-004 topic 1 question 38 discussion

Actual exam question from CompTIA's XK0-004
Question #: 38
Topic #: 1
[All XK0-004 Questions]

A Linux server needs to be accessed, but the root password is not available.
Which of the following would BEST allow an administrator to regain access and set a new known password at the same time?

  • A. Boot into single-user mode and reset the password via the passwd command.
  • B. Boot into single-user mode and reset the password by editing the /etc/passwd file.
  • C. Boot into single-user mode and reset the password by editing the /etc/shadow file.
  • D. Boot into single-user mode and reset the password via the chage command.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️
Reference:
https://phoenixnap.com/kb/how-to-change-root-password-linux

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
xeun88
2 years, 9 months ago
A is the correct answer. by booting into single usermode or rescue mode, you can change root passwd and user passwd by using the passwd command. exec /sbin/init to reboot
upvoted 4 times
...
Dan_Dan_The_Data_Center_Man
3 years, 7 months ago
Correct Answer: A. Boot into single-user mode and reset the password via the passwd command. Summary of below link. 1. Boot to single user mode. 2. remote drive. 3. change password using passwd. 4. restart https://phoenixnap.com/kb/how-to-change-root-password-linux
upvoted 2 times
...
bjornborg
3 years, 8 months ago
this is a tough one because frankly none of them would really work. You have to boot into what is called "shell mode", a lesser mode than even single user. So we are left with the least worst answer which I believe is A: A will work, and answers the question better than... C which would also work, but this blanks the password, not creates a new one B is out because passwords are not in the /etc/passwd file. D is out because chage just changes password aging (expiration dates for when to make a new password)
upvoted 3 times
...
jeffnoble14
5 years ago
https://vceguide.com/which-of-the-following-would-best-allow-an-administrator-to-regain-access-and-set-a-new-known-password-at-the-same-time/
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...