Can't change root password in AIX 5.2

Hi all,

I'm trying to change a password for root on an AIX 5.2 machine. Oslevel -r shows 5200-10 for this machine. Here's what happens:

/ # whoami
root
/ # passwd
Please type a new password:
Please re-enter the new password:
Changing UNIX password...
601 - Can't access the password for root

I'm entering a password that is 10 characters in length. Minimum length in /etc/security/user is 8 characters. I'm not sure why I'm receiving this message, "Can't access the password for root" because I am logged in as root. Anyone have any ideas? I'm stumped along with the others on my team. :confused:

Thanks,
Ryan

Is root listed in /etc/passwd and /etc/shadow?
Are the permissions correct on both those files (comparing with another AIX system)?

Hi Tony,

Root is listed in /etc/passwd but I do not have a /etc/shadow file. Is that a problem? Sorry if this is a silly question, but I'm much more a Windows guy than UNIX.

Thanks!

Will chpasswd work?

man chpasswd

Also, instead of /etc/shadow, it should be /etc/security/passwd on AIX 5.2.

Thanks for your help, Nathan. Everything looked fine in /etc/security/passwd. I then tried chpasswd to change root's password and it worked successfully! So the immediate problem is resolved. But if anyone knows why I was unable to change root with the usual passwd command, please let me know. I'd like to know the root cause of this problem some day.

Can anyone apart from change their password using passwd?

Try running:

uschk -n root
pwdck -n root

This may shed some light on the issue.

pwdchk -n root to find what the problem is without making changes.

likely candidate is: wtmp corruption

run pwdchk -y root to fix and say yes to everything.