1834406 Members
2409 Online
110067 Solutions
New Discussion

Root password

 
SOLVED
Go to solution
N. Man
Advisor

Root password

I lost root password; how can I recover it?
7 REPLIES 7
Rita C Workman
Honored Contributor

Re: Root password

Reboot server...be at the console (either in front of it, or via MP Port)

Interupt boot
Go into single user mode
Might need to mount /usr

But from here you can reset passwd.

Rgrds,
Rita

James R. Ferguson
Acclaimed Contributor

Re: Root password

Hi:

Two choices:

1. Remember what you forgot

2. Seriously: Boot into single-user mode and use 'passwd' to establish a new one.

Regards!

...JRF...
N. Man
Advisor

Re: Root password

Sorrrryyy guys ... I'm a .net/web developer :((... I don't know to many things about Unix. Can you please tell me step by step how do I do this? Sorry again about this.
Tim Nelson
Honored Contributor
Solution

Re: Root password

Trusted or non-trusted system ??

11.23 and 11.31 now ask for old password even in single user mode (at least with trusted system enabled ( maybe try /usr/bin/passwd vs /sbin/passwd)

Steps:

1 )Log in as root, wait, you do not know the password...
1) crash server either by RS or TOC from MP CM mode. ( or by pulling the power cords ;)

After self-tests you will be prompted for "hit any key to interupt in 10 sec... "

Hit the "any" key. (it is right next to the delete key ;)

From BCH enter "BO" ( assuming PA-RISC server)
when asked if you would like to interact with ISL answer "Y"

at ISL propmt enter "hpux -is"

System will boot to single user and you will have a shell prmpt.

If not trusted you may be able to just use the passwd command as noted above.

else if trusted:
mount /usr and /var ( might need to fsck them )
cd /tcb/files/auth/r
vi root
clear out the passwd field in this file then save.
execute passwd command
select a new password and remember it this time.

Boot to run level 3:
init 3
Torsten.
Acclaimed Contributor

Re: Root password

This information would be helpful:

# model
# uname -a

Please post results.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
SKR_1
Trusted Contributor

Re: Root password

Try this if works......

1. /usr/lbin/modprpw -x root
2. passwd root

Thanks

SKR
OFC_EDM
Respected Contributor

Re: Root password

I see the solutions are posted.

But once you solve your password issue I suggest to:

Create a secure drive (encrypted) on a secure server with limited user access and not connected to the internet.

Use a product like password safe and keep all your passwords in it.

Don't put it on your PC and carry it around with your...PC's / laptops get stolen.

This goes against the old philosophy of never writing passwords down. But when you have 100's to remember this is a viable option.

And you'll never have to worry about forgetting passwords again.

It's free and you can set it up to keep a password history in case you ever have to restore from an old backup and forget the old passwords.
The Devil is in the detail.