1833758 Members
2976 Online
110063 Solutions
New Discussion

forgot root password

 
SOLVED
Go to solution
O'lnes
Regular Advisor

forgot root password

I forgot the root password, but when i change it , it pop up message.

# passwd /etc/passwd root

Password cannot be changed. Reason: Cannot access protected password entry.

I also tried to change it by SAM, but it deny to do that.

any method to change it without reboot the system? Thanks.
Andy
8 REPLIES 8
harry d brown jr
Honored Contributor
Solution

Re: forgot root password


vi /etc/passwd??

Is this a TRUSTED system?

ls -l /tcb

live free or die
harry
Live Free or Die
Helen French
Honored Contributor

Re: forgot root password

Is this a trusted system? what is the passwd aging policy? Try this command if you are logged in as root:
# passwd
Life is a promise, fulfill it!
Uday_S_Ankolekar
Honored Contributor

Re: forgot root password

If system is trusted, then try following method

try unconvert change the password and converting the system to trusted.

SAM -> Auditing and Security -> System Security Policies -> Password Aging policies -> password aging

Select "disabled" and select OK

The above is required when you convert system untrusted, this will expire all the passwords of the users. hence it is very important so that it will not expire the passwords and your users will not see any difference.

1. /usr/lbin/tsconvert -r

change the root password

and then convert the system back as trusted.
2. Run /usr/lbin/tsconvert -c

Also take a backup of /etc/passwd file before doing anything
Good Luck..
Martin Johnson
Honored Contributor

Re: forgot root password

I would recommend creating a pseudo root account (UID=0) as a backup account to deal with problems like this.

HTH
Marty
harry d brown jr
Honored Contributor

Re: forgot root password

Or vi /tcb/files/auth/r/root

live free or die
harry
Live Free or Die
Rajasekhar Raman
Frequent Advisor

Re: forgot root password

If its a trusted system then you can go into /tcb/files/auth/r, vi the root file and clear the password field, and then reset the password from command line using the "passwd" command.

If it is not trusted, then make a copy of /etc/passwd, edit the password field for root, (set to no password). Then try setting it from command line

Either way do not log out of you root session, that is your only hope if you do not want to reboot your system!!

-Shekar
Allan Pincus
Frequent Advisor

Re: forgot root password

If you forgot root password, I don't see how you can change it.

The "backdoor" is to go to single user mode, which logs you in as root, then you should be able to do the simple password command.

To do this:

reboot
Enter BOOT ADMIN mode by tapping the esc key.

At the prompt type:

boot pri isl
Interact with ISL -> y

At the ISL>

Type hpux -is

This will boot you to single user mode, then you can change the root password.

Hope this helped.

- Allan
doug hosking
Esteemed Contributor

Re: forgot root password

Ummm... Before getting into fancier solutions, let's try a simple sanity check. This looks like a simple syntax error!

# passwd
or
# passwd root
makes sense, but I've never seen the syntax
you show. Did you accurately describe
what you really typed?