Operating System - HP-UX
1833875 Members
1586 Online
110063 Solutions
New Discussion

Re: Changing rootB4s password

 
Valkiria Santos
Frequent Advisor

Changing rootB4s password

Hello all,

I converted my system on trusted. I lost root??s password and trusted deactive my account, when I tried execute manually /usr/lbin/modprpw -k root, nothing happend. Then I tried reset root??s passwd and following message its displayed for me.

An invalid command syntax was used to invoke the command
"/usr/lbin/modprpw". Failed to update protected password database
for user "root".


Thanks for helps,
Valkiria
7 REPLIES 7
RAC_1
Honored Contributor

Re: Changing rootB4s password

check with authck for any problem with trusted mode.
also check if getprdef is working. It will list all options set.

Regards,
There is no substitute to HARDWORK
Valkiria Santos
Frequent Advisor

Re: Changing rootB4s password

All files tcb is ok

Valkiria
Scott Van Kalken
Esteemed Contributor

Re: Changing rootB4s password

Boot to single user mode, untrust the system, change the password and retrust the system.

BEWARE though.

If you do this from the command line, using the following commands:

/etc/tsconvert -r (I think)
then /etc/tsconvert -c

this will expire all other passwords on the system.

I found out the hard way.



Printaporn_1
Esteemed Contributor

Re: Changing rootB4s password

Hi Valkiria,
I guess that because of before change to trusted system , root password was longer than 8 characters.
OK,
Before try Scott's suggestion.
if you have console , login root at the console. if you can ,just make change to root password to < than 8 characters.
If you cannot login root at console , you may need to proceed with Scott's suggestion.
enjoy any little thing in my life
Jerry Anderson_1
Occasional Advisor

Re: Changing rootB4s password

The root password is stored in a file called /tcb/files/auth/r/root. The password should be in the same encrypted format as you would see in an untrusted system's /etc/passwd file.

* Boot to single user mode
* Issue: mount -a
* Make a backup copy of /tcb/files/auth/r/root
* Edit /tcb/files/auth/r/root
* Remove the encrypted password from the u_pwd= entry. The encrypted password is everything between the = and the final :\ on the line that begins :u_pwd=
* Save and close
* Reset root's passwd: passwd root

As a variation on that you could also replace root's password with the encrypted password from another user where you know the password.

Martin Johnson
Honored Contributor

Re: Changing rootB4s password

Jerry,

You are assuming Valkiria has some form of root access to modify /tcb/files/auth/r/root file.

I usually set up a pseudo root account (different username and password, but UID=0) to use when the root account becomes disabled for whatever reason. This has saved me many hours of frustration, especially with a production system that can't be brought down during the day.

HTH
Marty
Donald Kok
Respected Contributor

Re: Changing rootB4s password

I had the same problem the other day, this is what worked for me:

- login on the (web)console. According to the "trusted"manual this is always possible.
- vi /tcb/files/auth/r/root
- go to the line with u_pwd
- remove anything between = and :- exit
- login from another terminal
- you have to change your passwd immediately.

Hope this helps
Donald
My systems are 100% Murphy Compliant. Guaranteed!!!