To change the root password:
$ passwd root or sudo passwd root
$password: (requires an old password)
$new Password: (enter two times new password)
What if I forget the root password? You do not need to reinstall to log in in single-player maintenance mode.Restart the system first, in the second reading write under any key will appear menu screen , press "E" will be able to import into the grub editing mode. The picture you're looking at at this point is a bit like the bottom:
Move the cursor to the kernel line, and then press "E" again to enter the edit screen of the kernel line, and then in the screen that appears, the last party input signal:
Then press "Enter" to confirm, press B to boot import into the single maintenance mode! Under this mode, you will not need to enter a password in the Tty1 place to gain control of the terminal (and use the identity of root!). )。 You can then change the root password! Please use the value below to change the root password:
Reference: Brother Bird's Linux private cuisine
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Linux changes the root password and forgets the root password