Changing root password

I have two unix system A and B with same configuration.
I can use remsh from A system login to B system as root, but when I want to change the root password of B system, it ask me the old password, but i forgot it.
However, is it possible to change the B system root password? :frowning:

Thanks a lot

If system B is running HP-UX, the password is probably stored in encrypted form in /etc/passwd. Use remsh to open a window as root to system B. Keep this first window open in reserve in case a problem happens. Open a second window as root to system B. Save a copy of /etc/passwd: "cp /etc/passwd /etc/passwd.save". Now edit /etc/passwd and remove the encrypted password string from root's entry. Now use the passwd command to assign a new password. To test that it worked, su to some non-root user and then from that non-root account, su back to root.

If the system has been converted to a trusted system, the password would be in the /tcb/files/auth/r/root file. If you don't find the password in /etc/passwd, you could take a look at that file as well.

Thanks for detail information by Perderabo and blowtorch :slight_smile:
Problem solved