cancel
Showing results for 
Search instead for 
Did you mean: 

Recover Root Password

madhudeepan
Frequent Advisor

Recover Root Password

how to recover root password if it is forgot.
11 REPLIES
Pete Randall
Outstanding Contributor

Re: Recover Root Password

Reboot into single user mode - you'll automatically be logged in as root and then you can change the password to something you'll remember.


Pete

Pete
SoorajCleris
Honored Contributor

Re: Recover Root Password

Hi,

If you are not using tcb, you can boot the system in single user mode. There it will not ask you the password.

you can do it with passwd file.

Regards,
sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
SoorajCleris
Honored Contributor

Re: Recover Root Password

Hi,

If you have installed BOOTAUTH11i (product there will be a parameter BOOT_AUTH in security file. The new feature is disabled by default.
If you have enabled BOOT_AUTH then it will ask for the password in single user mode aslo.

:)

That time you may need to use recovery mode.

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Steven E. Protter
Exalted Contributor

Re: Recover Root Password

Shalom,

Once lost a password is lost.

For obvious reasons passwords can not be decrypted.

If the password is simple and you can get the /etc/passwd file you may be able to use crack to brute force guess the password.

Better to boot to single user mode and reset. That must be done at the console and in this instance may require a power off reset.

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
SoorajCleris
Honored Contributor

Re: Recover Root Password

Hi Madhudeepan,

"have assigned points to 3 of 145 responses to your questions"

You may always assign some points to your mates if they are helping you to increase your knowledge.. thats how you can encourage them .. :)

Thank you

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Lijeesh N G_1
Respected Contributor

Re: Recover Root Password

Hi,

Recover root password
=======================

1. Boot the system in single user mode. 
2. (If the system is not in trusted mode pls go to step 3)Systems that are not using Trusted System security skip to step #3.
For Trusted Systems (presence of a /tcb directory), follow these Additional steps:

a) Mount /usr file systems.
# mount /usr
Note: The file system might need file system check (fsck) before mounting.

b) Use the following command to reactivate the 'root' account:
# /usr/lbin/modprpw -k root

c) Use the below command to null the password, so that the passwd command does not prompt for the old password.

# /usr/sam/lbin/usermod.sam -F -p "" root

3. Change the root account password.
# passwd root

4. Boot the system in to multi user mode.

Regards,
LIJEESH N G
Ganesh.A
Advisor

Re: Recover Root Password

Hi,
Do u run any enterprise backuo softwares like ... netbackuo/omni ???
Raj D.
Honored Contributor

Re: Recover Root Password

Madhudeepan,
-Boot in Single user mode and recover it, using passwd root command.
- To boot in single user mode :
Interupt the boot sequence at PDC or EFI and use hpux -is or for itanium , at HPUX> boot -is

If it is trusted system it will ask for the old root password. Then follow the above method mentioned in the thread.

Hope this helps,

Cheers,
Raj
" If u think u can , If u think u cannot , - You are always Right . "
OldSchool
Honored Contributor

Re: Recover Root Password

@Ganeeh.A>
"Do u run any enterprise backuo softwares like ... netbackuo/omni ???"

@Raj D>
"If it is trusted system it will ask for the old root password. Then follow the above method mentioned in the thread"


If the OP hasn't figure this out in the prior 14 days, neither of the above are going to help. Besides, the above doesn't help if, as he stated originally, he *doesn't* know the password.
Raj D.
Honored Contributor

Re: Recover Root Password

Oldschool Thx for pointing out,

Madhudeepan,
Here it is ,
After booting in single user mode if it ask for old password, while changing the root pw to do below steps,

1. # /usr/lbin/modprpw -k root

2. nullify the root password, so that the passwd command does not prompt for the old password.

- # /usr/sam/lbin/usermod.sam -F -p "" root
- # /sbin/passwd root
Specify the new root passwrod here.

And now you recovered the root pw.



Also, instead of above 1 & 2 step : #/usr/lbin/tsconvert -r and /sbin/passwd root can also be done.
( Remember This will expire all other accounts pw, and /usr/lbin/tsconvert needs to be run again.)

- Then you can reboot the system in multiusermode and check logging into root with the newly assigned password. cool!.




Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "