Changing root password

I want to change the root password on an AIX box. What is the best method to do this so i do not get myself locked out. When I do i search the results come up for resetting the password if you are locked out.

Thanks

I'm not an AIX expert but the generic Unix answer is:

Login as root to give yourself the rights to do this

Use the passwd command like you would to change any user's password

# passwd <userid?>

but specify your own userid, thus

# passwd root

then follow the prompts.

Can I log in as root change the password then stay logged in and open another session to test. That way if it fails I am still in first session to try and change it again.

Sure thing.

If you are logged in as the user who's password you want to change, you don't need a username operand, just the command:

passwd

It will prompt you through the steps needed to change your own password.

To keep from getting locked out, make the new password you create something that you can remember.

Notice that changing the password from one user account for any other user sets the "ADMCHANGE" in /etc/security/passwd and the user will be prompted to change his password (again) the next time the user logs on.

To prevent this you can reset the flag by using the pwdadm command:

root # passwd user
passwd: *******
repeat: *******

root # pwdadm -c user

I hope this helps.

bakunin