You are not logged in.
Pages: 1
I first will admit: I am stupid stupid stupid for doing this...
My question is it possible to recover my root account if:
1) it has been locked with:
passwd -l root
which normally just locks the root account and should be undo-able by
sudo passwd -u root
2) my root login has been disabled with:
Defaults timestamp_timeout=0,rootpw
in my /ect/sudoers
so now i fully understand how to make a system completely void of an accessable root account
EVEN when i tried booting into single user mode, it prompts for my root passwd on boot but since i diabled root login, it seems this doesnt work either.
So im reinstalling soon, unless there is a quick fix i cant think of. help
P.S. dont try the above commands (together) at home, its baaad news kids
Offline
Boot to a liveCD and chroot into your install.
Offline
Edit /etc/passwd from a live CD and set the second field to 'x', then edit /etc/shadow and set the second the second field to blank. That will set you root password to empty: After that, reboot and login to a console as root and change the password as normal with passwd.
EDIT: Actually, all you need to do is remove the '!' from the front of the hash (second field) in /etc/shadow and the old password should work again.
Last edited by Bolts (2010-06-14 22:13:56)
Offline
Pages: 1