Operating System - HP-UX
1751936 Members
5000 Online
108783 Solutions
New Discussion юеВ

Forgotten root password !

 
Jemida Gabber
New Member

Forgotten root password !

I have recently bought a HP 712/80 running
hpux [B 10.01]
it boots ok to a generic console login but i have no password.
Do i go in with a disk editor and rename
/etc/passwd or can i boot single user like in linux ?
I know nothing about hpux but have experience with rh & mandrake linux.

Any help /advice will be greatly appreciated

thanks -
Jemida. [farmer@cyberspace.org]
24 REPLIES 24
Albert E. Whale, CISSP
Honored Contributor

Re: Forgotten root password !

If you rename the /etc/passwd file, then you'll need to reload the OS.

I would boot into the Single User mode (follow these instructions http://us-support.external.hp.com/cki/bin/doc.pl/sid=e8b4add20e3834639b/screen=ckiDisplayDocument?docId=200000048117891 ), from there you can reset the root password!

Hope that helps!

Sr. Systems Consultant @ ABS Computer Technology, Inc. http://www.abs-comptech.com/aewhale.html & http://www.ancegroup.com
Antoanetta Naghiu
Esteemed Contributor

Re: Forgotten root password !

Hello,
Once you boot in single user mod (hpux -is), you can edit /etc/passwd. Just vi /etc/passwd and delete the password field. In /etc/passwd file, : (colon) is the field delimitator and encrypted password field is the second one after user name. (root::0:3::/:/sbin/sh).
If you have password for single user mod you have to boot from cdrom.
If your box is in network with others, you can try to get an .rhosts or /etc/hosts.equiv file that allowed you to get in as root.
CHRIS ANORUO
Honored Contributor

Re: Forgotten root password !

Hello Jemida,

Reboot and interact through ISL. From ISL prompt use hpux -is, this will take you into single user mode. At the prompt you can change your root password. Then reboot the system.

Cheers!
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Andreas Voss
Honored Contributor

Re: Forgotten root password !

Hi,

just for convenience:

Turn on your box
Hold on the Escape key until a menu appears.
Type 'boot pri isl'
When the ISL> prompt appears type:
hpux -is
(if you have HP-UX 9.x type: hpux -is boot)
The system is now booting in single user mode.
When you get the root shell prompt (#) type:
passwd root
The system asks you twice for the new root's password.
If you have done type:
reboot
Now your box reboots and comes normally up and you can login as root with your previous changed password.

Greetings

Andrew
Gino Vald├йs
Occasional Contributor

Re: Forgotten root password !

Turn on your box
Type 'boot pri isl'
When the ISL> prompt appears type:
hpux -is
When you get the root shell prompt (#) type,
mount -a
passwd root
the system asks you twice for the new root's password.
type reboot, in shell prompt (#)
Now your box reboots and comes normally up and you can login as root with your previous changed password
Venu_2
Regular Advisor

Re: Forgotten root password !

Hi,

Adding for the above

In case pressing ESC key doesn't bring you to the menu, it means the workstation is secured.

I such condition you have to disconnect the disks and switch it on.

As the disks are not available autoboot comes out with error,here you can disable the secure mode.

Switch off, connect the disks and follow the procedure give by Andreas voss.

Cheers

venu

Re: Forgotten root password !

Jemida,

1) Interrup the boot
2) boot in single user mode (ISL> hpux -is)
3) mount /var, /usr
4) cd /etc
5) vi passwd
6) delete the password encripted
7) reboot the system

Bye
Hello everyone
Philip Chan_1
Respected Contributor

Re: Forgotten root password !

Guys,

What if the system is in trusted mode? does it mean something got to do with the shadow password file too? I ran into the above problem before and luckly I had another account that could run restricted SAM, through that I un-trusted the system then do the single user mode trick.

Rgds,
Philip
Rick Garland
Honored Contributor

Re: Forgotten root password !

Another option is to disconnect all bootable devices from the system and then boot. If the root passwd is locked in single user mode (can't change unless you know the root passwd) the system will boot, look for bootable devices, not find any, come up to unsecure mode so you can change the root passwd.