ubuntu12.04 Forgot your username password solution

Creative background:

On the night I could not sleep last night, engage in engage in kvm, installation is ubuntu12.04-server, there is no version of the interface;

After installation, the user login name and password to forget, was an afterthought, remember to follow this operation.

PS: most of the night to fiddle with things the brain is not enough, stay up all night is really damage the health of distracting renal injury.


Start

After ubuntu12.04 boot the installation when the user name and password ( user name or password or  both ) forgot

Follow the following to say to carry out his


(Ubuntu interface did not start soon)

1, at the start, moving up and down keys, select the repair mode "Ubuntu-xxxx.xx-generic (recovery mode)",

Then press E (remember, is selected, the selected press E , do not need to press the Enter [Do not deft press Enter, or else they have to reboot it again] )

 

2 , edited by pressing e

 

3 , modify the startup parameters, the back of the ro single to rw single init = / bin / bash

 

4 , press ctrl + x start system you can enter the single mode without the need for a password, the user is directly into the root

 

5 , then you can use the command passwd username   to modify the password, the user name is an example of vm-01-u12, the following example:

root@(none):/# passwd vm-01-u12
Enter new UNIX password:
retype new UNIX password:

Enter the new password, reboot reboot on it!

 

 


— —

to be continued……

 

 

Published 237 original articles · won praise 167 · views 30000 +

Guess you like

Origin blog.csdn.net/frdevolcqzyxynjds/article/details/105276213