Sunday 19 August 2012

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

No comments:

Post a Comment