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.
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
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
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)
This section is not available anymore. Please use the main Exam Page.XK0-004 Exam Questions
Log in to ExamTopics
Sign in:
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.
xeun88
2 years, 9 months agoDan_Dan_The_Data_Center_Man
3 years, 7 months agobjornborg
3 years, 8 months agojeffnoble14
5 years ago