Changing a linux password, recovering

ref: http://www.youtube.com/watch?v=CLwqGce6AGo

Boot into a shell as root
type ‘e’ at the grub menu
change the line “ro quiet splash” TO “rw init=/bin/bash”
press CTRL-D to boot

search for home directory to find the username
confirm username by cat /etc/passwd
type ‘passwd USER’
type in new password & confirm
type sync
reboot

another option is to boot from a live CD, mount the hard drive (sudo fdisk -l) and edit a character in the /etc/passwd file.
user:x:1000:1000:user,,,:/home/user:/bin/bash
to
user:x:1000:1000:user,,,:/home/user:/bin/bash
umount and reboot

login without a password.  Put a password in by typing
‘passwd user’
then
sudo shadowconfig off
sudo shadowconfig on

WindyCityTech Blogger
WindyWindyCityTech WordPress

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s