Operating System - HP-UX
1837270 Members
2786 Online
110115 Solutions
New Discussion

root password set with root password lost

 
Giuseppe_13
Frequent Advisor

root password set with root password lost

The root password has been lost.
How is possible to set root password ?

Thanks
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: root password set with root password lost

Go to or access the console.

Boot the box with GSP or power cycle the system. Its a must that the system must be as idle as possible. Shut down databases and such if possible.

Interupt the boot at the 10 second prompt.

bo

Ineract, take the Y option

hpux -is

You will boot single user mode and probably NOT be prompted for a root password. You are root.

You can now run the passwd command and set the root password.

ONLY If its a trusted system:

mount /var
mount /usr

vi /tcb/files/auth/r/root

null out the pwd entry.

Save the file.

shutdown -ry now

You now have no root password. After boot, use the passwd command to set it IMMEDIATELY.

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
Fred Ruffet
Honored Contributor

Re: root password set with root password lost

You must boot in single mode. Or from install CD.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Jeff Schussele
Honored Contributor

Re: root password set with root password lost

Hi Guiseppe,

Two ways to do it if you're not now logged in as root. Both will require a reboot. You may need to get into the GSP to reset the system.
Both require going into single-user run level.
1) Mount the filesystems with a mount -a. Then run /sbin/passwd root
2) IF the system is in trusted mode. Mount the filesystems with mount -a. Then edit the /tcb/files/auth/r/root file & remove the characters between :u_pwd= and :\ Be sure to leave those - just remove the data between.
Then you can set a new PW with the passwd command.
When complete just run init 3 to get back to multi-user run level.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Fred Ruffet
Honored Contributor

Re: root password set with root password lost

Oops !!! I didn't saw I got out of Linux forum... Forget my answer :)

Fred
--

"Reality is just a point of view." (P. K. D.)
Giuseppe_13
Frequent Advisor

Re: root password set with root password lost

Thanks
Prblem solved.