Operating System - HP-UX
1748151 Members
3540 Online
108758 Solutions
New Discussion юеВ

Re: password change trusted system

 
SOLVED
Go to solution
John Dvorchak
Honored Contributor

password change trusted system

I have 4 hpux 11.23 "trusted" systems and I need to change the root password. When I run the passwd command it prompts for the old one but I don't know the old password. I seem to remember an undocumented sam command line that would allow the change without knowing the old password or it would zero it and I coulld then set it. I can ssh as root no problem but of course I need to set the password so we can use the console.
If it has wheels or a skirt, you can't afford it.
9 REPLIES 9
SKR_1
Trusted Contributor

Re: password change trusted system

Try

/usr/lbin/modprpw -k root

Thanks

SKR
SKR_1
Trusted Contributor

Re: password change trusted system

Sorry

Use -x option

/usr/lbin/modprpw -x root


Thanks

SKR
John Dvorchak
Honored Contributor

Re: password change trusted system

No that didn't work. Here is what is happening. I don't remember the old password. Root is not locked out I just can't change the password because I don't remember the old one. I can ssh as root or sudo root but I still can't login on the console because we don't have the root password.

I remember either zeroing out the password or doing away with it prompting me for the old one. I think it was an undocumented SAM command line or it was the passwd command in the sam directory tree somewhere. In any event I remember putting a -p or -P then I could run passwd and it would change to the new one. Ring any bells?
If it has wheels or a skirt, you can't afford it.
John Dvorchak
Honored Contributor

Re: password change trusted system

That didn't work either:

root> /usr/lbin/modprpw -x root
modprpw: -x is not allowed for root
If it has wheels or a skirt, you can't afford it.
Tim Nelson
Honored Contributor

Re: password change trusted system

If you can successfully become the root user then.

edit /tcb/files/auth/r/root ( zero out the passwd field.

If you cannot successfully become root then you need to crash the system to single user and do the above.

No other way...

John Dvorchak
Honored Contributor

Re: password change trusted system

Thank you Tim. I ended up doing it that way but I know there is another method I've used in the past. It was a SAM command line that alowed me to zero the password for root then I could change it with the normal passwd command without it prompting for the old one. I don't think it was a modprpw but a /something/sam/passwd -d command as I remember.
If it has wheels or a skirt, you can't afford it.
Mustafa Gulercan
Respected Contributor
Solution

Re: password change trusted system

hi John;
i think this is what you are looking for,

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

regards,
mustafa
Prashanth Waugh
Esteemed Contributor

Re: password change trusted system

Hi John,

For your information

#modprpw -x ( root its not for superuser.)

In manpages of modprpw its clearly mention that root cant run this command for itself.

Regards
Prahant
For success, attitude is equally as important as ability
John Dvorchak
Honored Contributor

Re: password change trusted system

Mustafa that is exactly what I was looking for. Thank you!
If it has wheels or a skirt, you can't afford it.