Operating System - HP-UX
1752492 Members
5260 Online
108788 Solutions
New Discussion

Re: HP-UX 11.31 and forgotten Root Password

 
Kennedy G. Doss
Regular Advisor

HP-UX 11.31 and forgotten Root Password

HP-UX Gurus:

 

What do you guys do when a fellow SA has changed the root password and forgotten to inform us (and has now left the company). Is there a way to break into the box without re-installing the Operating System? If there is a procedure which exists, will it work both on physical servers and IVMs? Any input would be most appreciated.

 

Regards,

-Kennedy

5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: HP-UX 11.31 and forgotten Root Password

You neglected to mention whether your system(s) are trusted or not.  If not, it is as simple as rebooting into single user mode and you will be automatically logged in on the console as root.  Change the password, issue the "init 3" command to come up into multi-user mode and you're all set.  If trusted, it gets a trifle more complex.


Pete
Kennedy G. Doss
Regular Advisor

Re: HP-UX 11.31 and forgotten Root Password

Thanks for the quick response, Pete. I am looking for a procedure on a trusted system.

 

Pete Randall
Outstanding Contributor

Re: HP-UX 11.31 and forgotten Root Password

Patrick Wallek
Honored Contributor

Re: HP-UX 11.31 and forgotten Root Password

If the system is trusted, it is not that much more of a problem.

 

You still need to boot into single-user mode.

Once there, you will need to mount at least the /usr and /var filesystems.

You can the edit the /tcb/files/auth/r/root file with vi.

 

The line you will want to change starts :u_pwd and will look something like:

 

:u_pwd=WkYfTXwrG5c5U:\

 

What you will want to do is remove the encrypted password from this line to make the line look like:

 

:u_pwd=:\

 

This will make it so root does not have a password.  You can now change the root password easily.

Kennedy G. Doss
Regular Advisor

Re: HP-UX 11.31 and forgotten Root Password

Patrick:

 

Thanks for the prompt reply and I really appreciate the time you took to reply to this message. When we tried to reboot and get into the single user mode, we got this message "Access is denied by the AUTH_MAXTRIES attribute in security(4).". Maybe because we retried using the old password a number of times. Does this mean we have no way out other than a rebuild?

 

-Kennedy