Thursday, February 2, 2012
reset linux password for a forgot user account
It is funny that I forgot both user name and password for an OpenSuse virtual machine, which I created and had not used it. Fortunately, I remembered I can boot linux in single user mode to reset password. I write it down here in case i forget password for other copy of linux again.
1) When boot linux with GRUB, press key "e" or move cursor up/down to see boot option editing line.
2) add "single init=/bin/bash" at the end of boot option line
3) once booting up linux, type "passwd root" to reset root password.
4) For my case, I even forgot the user name I created before. So, I go to "/home" and list sub directory there. I saw a folder called "yiyu" there. So, I know the user account I created before is "yiyu".
5) type "passwd yiyu" to reset my user account password.
Labels:
linux
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment