Operating System - HP-UX
1833589 Members
4538 Online
110061 Solutions
New Discussion

Re: Resetting root password on server

 
SOLVED
Go to solution
Erick Griffin
Advisor

Resetting root password on server

I have an HP9000 rp34* server which does not have any graphics card, etc attached to it, only a serial console connection. I need to reset the root password but I am not sure how I get into single user mode to do so. I assume I have to use the console to reboot the machine into this mode to reset the root password by editing /etc/passwd? Does anyone have a procedure to do this for this server? Thanks.
8 REPLIES 8
Pete Randall
Outstanding Contributor

Re: Resetting root password on server

Is the root account locked out? Is this a trusted system? For a non-trusted system, if you can log in, you would issue the "shutdown -r -y 0" command, then interrupt the boot process at the "10 second" prompt and enter "hpux -is" at the ISL prompt. That brings you up in single user mode, logged in as root.


Pete

Pete
Rick Garland
Honored Contributor

Re: Resetting root password on server

You do not need single user mode to reset root passwd.

As the root user, just type in the command 'passwd' It will prompt you along the way for the steps to take. To ensure you are root user, type the command 'id'. The response will tell you that you are root with UID=0.

Do not edit the /etc/passwd to change a passwd as the value is encrypted.

You can reboot from any terminal in which you have root access. Do be careful of this capability.
Giacomo TOTTI
Advisor
Solution

Re: Resetting root password on server

Hi Erik,
you have to boot from a HP-UX CDROM (OS core) - it's bootable, and follow this:

When "to discontinue press any key" appears... press any key

Main Menu: Enter command or menu > sea

Path# Device Path (dec) Device Path (mnem) Device Type
----- ----------------- ------------------ -----------
P0 0/0/2/0.2 intscsia.2 Random access media

Main Menu: Enter command or menu > bo p0
Interact with IPL (Y, N, or Cancel)?> y

Booting...
Boot IO Dependent Code (IODC) revision 1


HARD Booted.

ISL Revision A.00.38 OCT 26, 1994

ISL> hpux -is

INIT: Overriding default level with level 's'

INIT: SINGLE USER MODE

INIT: Running /sbin/sh
#
#
# fsck

# mount /usr

# mount /var

# passwd
Changing password for root
New password:
Re-enter new password:
Passwd successfully changed

# init 3


enjoy

Giacomo
Erick Griffin
Advisor

Re: Resetting root password on server

Giacomo, Ok, what you related in your note wasn't perfect but close enough that I was able to figure it out and got my root password changed! Thanks.!
Pete Randall
Outstanding Contributor

Re: Resetting root password on server

Well, there's no need to boot off a CD, Erick - just booting into single user mode as I described will do exactly the same thing but each to their own!


Pete

Pete
Rick Garland
Honored Contributor

Re: Resetting root password on server

No need to go into single user mode to reset root passwd. Just issue the passwd command as the root user.

If this was required then everytime the root passwd needs to be changed it would take system downtime.
Pete Randall
Outstanding Contributor

Re: Resetting root password on server

Yeah, I know, Rick - I was making the assumption (always dangerous, I know) that the password had been forgotten.


Pete

Pete
Rick Garland
Honored Contributor

Re: Resetting root password on server

I was thinking that myself Pete but the post did not make mention of it.