1753505 Members
6087 Online
108794 Solutions
New Discussion юеВ

forgot root password

 
juno3
Occasional Advisor

forgot root password

If forgot root password , how to get back the password ? thx.
12 REPLIES 12
Andy Kruta
New Member

Re: forgot root password

You have to boot into initlevel 1. This will load the system as root, but not load PAM, and thus allow you to change the root password.
Steven E. Protter
Exalted Contributor

Re: forgot root password

reboot your machine. Any user empowered to shutdown can do it. If nobody other than root can do so, use the power switch. Shut down any and all applications first.

At restart, interupt at the 10 second prompt

type bo
Y to interact with the ipl

hpux -is

After the system boots, passwd

You will be prompted twice.

If you have password protected single user mode then your only other viable option is to let crack run on your passwd file for a few days and hope it guesses it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: forgot root password

Disregard my post. I thought I was in HP-UX.

You can run crack on /etc/passwd that will eventually guess the password. Run it on a copy of the passwd file, not the original.

Beware that crack will use a ton of system resources.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
juno3
Occasional Advisor

Re: forgot root password

hi Andy ,

I use RH 9 , how to boot to level 1 ? thx.
Vitaly Karasik_1
Honored Contributor

Re: forgot root password

for GRUB boot-loader:

- press "e" when you see boot menu

- go to line with your kernel and press "e" again

- add 1 in the end of the line

- press "b" for boot


Vitaly
juno3
Occasional Advisor

Re: forgot root password

Thx VK, after I boot to the system , how can I know what run level it is ? thx.
Vitaly Karasik_1
Honored Contributor

Re: forgot root password

you can check it by


runlevel


commmand.

And if you have command prompt now, you can use


passwd


command in order to set new root password
kenny chia
Regular Advisor

Re: forgot root password

Hi
you can try this utility from this web site, assuming you have access to /etc/passwd

http://www.openwall.com/john/
All Your Bases Are Belong To Us!
Ralf Puchner
Honored Contributor

Re: forgot root password

why not booting Linux from CD or disk (e.g. Installation disk) and mounting the root filesystem from harddisk to /mnt, edit the /etc/passwd and reboot the system.

Voila, most of the linux distributions offers an emergency mode on the installation cd/disk.
And with such a disk it is fairly easy....
Help() { FirstReadManual(urgently); Go_to_it;; }