centos7 forget the root system administrator account password, how to change the password of the solution

First, open centos7, press the "e" in the choice of entering the system interface to enter the edit page.

u=3463291023,542716659&fm=173&app=25&f=JPEG.jpg

Press the down key, to find the row "Linux16" beginning, at the end face of the input line "init = / bin / sh"

u=1173290808,3824442718&fm=173&app=25&f=JPEG.jpg

Then press "ctrl + X" single-user mode key combination

u=3790834759,3968707017&fm=173&app=25&f=JPEG.jpg

Then enter "ls" query the current position (may be omitted), Enter

u=4016394471,174381262&fm=173&app=25&f=JPEG.jpg

Then enter "mount -o remount, rw /" (note that a space / -o between between the mount and with rw)

u=3784466515,576802524&fm=173&app=25&f=JPEG.jpg

Then enter the "passwd" Enter

u=1201124004,2452359076&fm=173&app=25&f=JPEG.jpg

The next step is to change your root account password, and re-enter a password less than eight

(Password while typing is not displayed, it looks like the same did not respond, just enter the correct and enter on it)

u=3977265053,943982552&fm=173&app=25&f=JPEG.jpg


u=1709637982,3692244983&fm=173&app=25&f=JPEG.jpg


Then enter touch /.autorelabel, Enter

u=3108464811,2244138693&fm=173&app=25&f=JPEG.jpg

Enter the exec / sbin / init, carriage return

u=1149412101,3694421323&fm=173&app=25&f=JPEG.jpg

The following screen appears after the carriage return, here a little wait a few minutes, the system will automatically restart

Then on the other system restart and then enter check whether they have succeeded modified

---------------------------------------------------------------------------------------------------------------------

  If you resolve your problem, if you feel quite good,

  RBI may tip, voluntary, sort of a few cents is love, good things or want to share,

  You can also walk away with a red envelope Alipay, scan code collar red envelope, you can use Alipay red envelope arrived now, you can sweep every day, real and effective

bf445807248e7ece9ce01b9f5eff53b.jpg



Guess you like

Origin blog.51cto.com/sf1314/2433180