1847211 Members
2384 Online
110263 Solutions
New Discussion

Re: forgot root password

 
Cheung_2
Frequent Advisor

forgot root password

If forgot root password, how to reset it ? thx.
Andy
12 REPLIES 12
Ashwani Kashyap
Honored Contributor

Re: forgot root password

Boot your system in single user mode and change the password .
Rajeev  Shukla
Honored Contributor

Re: forgot root password

I am affraid but thats the only way.
Reboot the server and terminate at the boot process.
at PDC type bo
Interact with IPL (say Yes)
at ISL type
hpux -is
this takes you to single user mode. Change the password and bring to multiusermode

Cheers
Rajeev
Animesh Chakraborty
Honored Contributor

Re: forgot root password

If it is trusted system then it may not be so easy.
The other day I was trying to change the root password after booting in single user more but it was asking old password :(
And also there is an option in system security policy -->General user account policy --> [ ] Require Login Upon Boot to Single-User State
If it is enable then it is not your day.
Did you take a backup?
sycncs
Advisor

Re: forgot root password

Hi Cheung

You can do a passwd -d root.
This allows you to login as root without password prompt. Once you are logged in, change your passwd immediately.

Hope this helps.
Ian Kidd_1
Trusted Contributor

Re: forgot root password

The only way to reset root's password on a conventional system is to boot to single-user mode. Hopefully, you have another session open somewhere logged in as root. Then you can just issue the passwd command.

I would suggest you install sudo or sfu onto your system then give your ID full rights. That way you'd be able to reset root's password without the need to reboot. you can't perform this action now (since you need to be root to install), but might save your bacon at a future date. It saved me a few times.

In regard to Animesh's comment about "Require Login Upon Boot to Single-User State", I use:
/usr/lbin/getprdef -r -m bootpw
The output of that command will be NO or YES. I have this in a script called in cron that will notify me if that check box is marked.

If at first you don't succeed, go to the ITRC
Animesh Chakraborty
Honored Contributor

Re: forgot root password

Thanks Ian.
/usr/lbin/getprdef -r -m bootpw noted in my memory.
Did you take a backup?
Ricky B. Nino
Frequent Advisor

Re: forgot root password

Hi Ian Kidd,

Please elaborate more on the command...

/usr/lbin/getprdef -r -m bootpw .

Does this enable/disable the password requirement at the single user mode?

or

It will just display if the password requirement is enable/disable at for single user mode?


Opportunities expand for people willing to put time and effort into learning new skills.
Michael Tully
Honored Contributor

Re: forgot root password

The 'getprpw' command only displays information in the TCB database. If you have an 11i system you can view the man page on this. The 'modprpw' command can be used to change it. If you have an 11i system there are man pages on these.
Anyone for a Mutiny ?
Michael Tully
Honored Contributor

Re: forgot root password

The 'getprpw' command only displays information in the TCB database. If you have an 11i system you can view the man page on this. The 'modprpw' command can be used to change this selection.
Anyone for a Mutiny ?
Rajeev  Shukla
Honored Contributor

Re: forgot root password

Hi Animesh,
If its a trusted machine, still its not difficult. Instead of using just passwd (which is /usr/bin/passwd) which asks for old password use /sbin/passwd it wont ask you for old password and then you can change the password easly.

Cheers
rajeev
Jochen Heuer
Respected Contributor

Re: forgot root password

Hi Cheung,

do provide some points to answers that solved your problem please ...

Jochen
Well, yeah ... I suppose there's no point in getting greedy, is there?
Jose Mosquera
Honored Contributor

Re: forgot root password

Hi,

I'll try with the anti-tech method, if your system haven't strict security polices, pls try get via ftp with an user the /etc/passwd file to your PC then use any password cracker available on Internet to decrypt root password. This looks crazy but in some cases works!

Rgds.