Operating System - HP-UX
1752614 Members
4424 Online
108788 Solutions
New Discussion юеВ

Re: can not change root passwd with root id

 
SOLVED
Go to solution
Anh-Thu Tran
Frequent Advisor

can not change root passwd with root id

We directly login to HP-UX 11i with root id and try to change root passwd by using "passwd root". We got error said "Unexpected failure. Password file unchanged" after it let us enter the new passwd and confirm. Don't know what's wrong. Please help. This machine is NIS client.
10 REPLIES 10
DCE
Honored Contributor

Re: can not change root passwd with root id

try passwd by itself. Since you are logged on directly as root, you should not need to specify the id.

Anh-Thu Tran
Frequent Advisor

Re: can not change root passwd with root id

I got the same result with your suggestion.
Jeff Schussele
Honored Contributor

Re: can not change root passwd with root id

What's the result of the following command?

which passwd

You may need to use the binary in sbin instead of the one in /usr/bin. The one in sbin is statically linked and will work even in singlr user mode or when there may be lib files missing or corrupted.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
DCE
Honored Contributor

Re: can not change root passwd with root id

Are you using any special characters in the paasword? There are a few (*,#) that will not work.
Juan M Leon
Trusted Contributor

Re: can not change root passwd with root id

Hi, I will suggest to use the following

passwd -n files root

It will force to change the password locally. I hope it works for you

Thanks

Juan
Anh-Thu Tran
Frequent Advisor

Re: can not change root passwd with root id

We used the same passwd and changed successfully on another HP 11i machine. So I don't think passwd is the problem. The size and permission between /sbin/passwd and /usr/bin/passwd is liltle bit different. Should I concern about that?
Juan M Leon
Trusted Contributor

Re: can not change root passwd with root id

Correction what I meant is -r
password -r files root

previous post is incorrect.

Thanks

Juan
Ryan Green
Valued Contributor
Solution

Re: can not change root passwd with root id

Run the pwck(1m) command against the password file. If someone did a vi or vipw, they may have introduced an error in the file.

Use the -s option for tcb. In this case, someone may have performed an edit on root's file.

If this doesn't work, and you're getting logged in as root, you can copy a known encrypted password from another user into root's password field.
Anh-Thu Tran
Frequent Advisor

Re: can not change root passwd with root id

After running pwck and correct some error based on its recommendation, we successfully changed the root passwd. Thank you everyone.