Operating System - HP-UX
1836629 Members
1846 Online
110102 Solutions
New Discussion

Change root password on trusted system

 
SOLVED
Go to solution
Jannik
Honored Contributor

Change root password on trusted system

I would like to changes root password on my K260 runnig HPUX10.20, the system is a trustet system that i can't convert to untrusted 55K users and i don't know the impact.

What is the normal way to change roots password on a trusted system?
jaton
14 REPLIES 14
Mel Burslan
Honored Contributor
Solution

Re: Change root password on trusted system

login as root and run command passwd

is there any problem with this method ?
you need to provide the old password af course but as root user, you should know it already.

________________________________
UNIX because I majored in cryptology...
Jeff Schussele
Honored Contributor

Re: Change root password on trusted system

HI Jannik,

Just su or sudo to root & run the passwd command as normal.
Always a good idea to have 2 windows open just in case you typo it or something bad occurs. Then you could just blank out the PW field in the tcb entry if necessary with the other window.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Pat Lieberg
Valued Contributor

Re: Change root password on trusted system

If you are logged in as root, you can simply run the passwd command. In a trusted system environment, you need to provide the old password during the change.

If the root account has been locked out, you can login at the console and unlock the account there and change the password if you need. Even on a trusted system, the root account is always allowed to login at the console.
DCE
Honored Contributor

Re: Change root password on trusted system

Jannik

It is the same as an untrusted system.

log on to the system as root and enter the command

passwd root

You will have to enter the old password before the system will alow you to change it.

Dave
Jannik
Honored Contributor

Re: Change root password on trusted system

hmm I get an error I will send it tomorrow when i have access to the system... it is some like root/mail directory not on system
jaton
Mel Burslan
Honored Contributor

Re: Change root password on trusted system

if worse comes to worst, create a dummy user, change password of this user (assume the dummy username is tempuser)

then

cat /tcb/files/auth/t/tempuser
copy the encrypted password

then use your favorite editor (a.k.a. vi) to edit

cat /tcb/files/auth/r/root
delete the encrypted password field and paste the string copied from the tempuser.

save and exit

run command

pwconv

to update the database.

your root password should be the password of the tempuser. Now go ahead and remove the tempuser

________________________________
UNIX because I majored in cryptology...
Jannik
Honored Contributor

Re: Change root password on trusted system

This is the error:

# passwd root
Enter new password:
Enter it again:
Password change is now scheduled.
Skipping change of user: root/mail: User doesn't exist.
jaton
Arunvijai_4
Honored Contributor

Re: Change root password on trusted system

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=764574

Similar thread with lots of solution.
# /usr/lbin/modprpw -l -k root

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: Change root password on trusted system

>>
Password change is now scheduled.
Skipping change of user: root/mail: User doesn't exist.
>>

saying that /tcp database for root may be corrupted. Just do as,

# remove encrypted passwd in /tcb/files/auth/r/root

then run

# passwd

now change it

hth.
Easy to suggest when don't know about the problem!
Jannik
Honored Contributor

Re: Change root password on trusted system

Arunvijai:
# /usr/lbin/modprpw -l -k root
/usr/lbin/modprpw: illegal option -- l

Muthukumar:
I have removed the enqypted passwd for root and when i do:
# passwd
Syntax: /usr/bin/passwd
# passwd root
# passwd root
Changing password for user root
Enter new password:
Enter it again:
Password change is now scheduled.
Skipping change of user: root/mail: User doesn't exist.

So that did not help... anyone have another sollution?
jaton
RAC_1
Honored Contributor

Re: Change root password on trusted system

passwd -r files root
/usr/lbin/getprpw -m lockout root
This should show 000000, if everything is ok.
There is no substitute to HARDWORK
Arunvijai_4
Honored Contributor

Re: Change root password on trusted system

Can you try checking man page of modprpw for correct option ?
I dont have 10.20 to check now .. Sorry.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: Change root password on trusted system

Are you using passwd command or anyother script linkted to it. passwd will take root user as default?

can you check as,

# which passwd
# ls -l `which passwd`

hth.


Easy to suggest when don't know about the problem!
Jannik
Honored Contributor

Re: Change root password on trusted system

tnx for the help you were all correct :-) the problem is the system. It is not a standard installation so the which passwd gave me a clue to run locate passwd that gave a lot.
I found that the original passwd binary was moved to passwd.org and when i used it all worked. TNX to all ... Hope you like the points.
jaton