Recover HP-UX root password

If you lost the root password on system running HP-UX, perform the following steps:

Ask all other users to log off the workstation.
Type the command sync four times to clear the buffer cache.
If you have installed sudo, or if you have enabled a user other than root to reboot the machine, reboot your workstation.
If you can not reboot the machine, press the reset button to force a reboot. Don’t press the reset button unless you can’t get the machine to reboot any other way.
During the reboot, press the ESC key to interrupt the reboot.
This will bring you to the BOOT_ADMIN prompt. From here, boot to the ISL with the command boot scsi.X.0 isl where scsi.X.0 is the SCSI address of your internal disk drive. (To find that address, use the path command at the BOOT_ADMIN prompt.)
Now you are at the ISL prompt. Boot up into single user mode with the command hpux -is (or if you are still running 9.X use the command hpux -is boot disk(scsi.X;0)/hp-ux, where again scsi.X.0 is the SCSI address of your internal disk drive.)
After the machine has come up in single user mode, you can try to set the root password by running the passwd command. If the program will run, you can enter the new password now. Reboot again (command reboot) and you are done.
If the passwd program will not run in the single user mode, manually edit the /etc/passwd file (be careful!) and take out the root password (second field), leaving the 2 colons side by side.
Now, quickly reboot the machine (reboot) and log in as root. No password is required. Immediately run the passwd command and set a password for root.
It’s important to minimize the time between removing the root password from the /etc/passwd file and resetting the password with the passwd command.
During this time, your system is wide open.

Advertisements

2 thoughts on “Recover HP-UX root password

  1. Thanks for your marvelous posting! I certainly enjoyed
    reading it, you’re a great author.I will ensure that I bookmark your blog
    and definitely will come back at some point.
    I want to encourage that you continue your great posts, have a nice day!

  2. I was pretty pleased to discover this website. I want to to thank you for your time due to this wonderful read!!

    I definitely loved every little bit of it and i also have
    you saved as a favorite to check out new stuff on your web site.

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