superuser password change

how can i change the superuser password?

the admin left the company, and we want to change the password.

to gain su access, i use:
# su -
password:***** (old password)

then, using passwd command it changes my own login password, not the root??

(this is not trying to block anybody's access, it' s just that the guy left without cleaning up and turning over some stuff...)

thanks a lot.

Use # passwd root

I know this goes without saying, but I will say it.

If you can't su to root, you will have to reboot to single user mode and then execute " passwd root " to change the password. I know that my company has a policy about changing the password/door locks whenever an SA leaves the company.

Also, I think by how you framed the question, that I am assuming that your system is logged in at the console.

I try to never leave the console logged in. just to be safe. I would advise, if that is possible, don't leave root logged in, unless you system is physically secure.

thanks for the tips and answers...

Our company requires root and admin passwd changes every 30 days. It is a real pita! But yes, "passwd root" works. If you are running NIS+ there are a couple other steps to fix the secure RPC passwd (chgkey -p ; nisping org_dir ; keylogin -r).