Operating System - HP-UX
1748144 Members
3719 Online
108758 Solutions
New Discussion юеВ

Re: root password expired on 11.23

 
Abdul Nazar
Occasional Advisor

root password expired on 11.23

Hi all,

root password expired on my hp unix server(11.23,rx2600).this is a trusted server.when i try to su to root i am getting password expired message.this is cluster secondary node.Please help me how i can reset the root password.Sudo configured,but dont have idea about any user privilege.Console not configured on this server.
6 REPLIES 6
Mel Burslan
Honored Contributor

Re: root password expired on 11.23

If you know the old (expired) root password, you can change it by typing the old password first and typing a new password twice after that, when asked.

In case of not remembering the old root password, your only option is to boot into single user mode and change it then and there, hopefully machine is not configured to require a root password even in single user mode.

Unless you know the expired password for root, if sudo is configured, there is a way of doing this if you are very careful:

sudo su -
enter your own password here
id
you must see user id 0, which means you are root.
cd /tcb/files/auth/r
cp root backup_root # just in case

useradd -m dummy # or any unused username
passwd dummy
give it a password
cd ../d
cat dummy
copy the encrypted string on the password line up to the colon sign (do not include the colon)
cd ../r
vi root
delete the password string and paste the copied password string in its place, making sure the length of deleted string and pasted string are the same.
save and exit
passwd root
give password for user dummy as old password
select a new password and type twice when asked
This should take you out of the pickle.

Failing that, your only option is to go to single user and changing it.

If you have a good and working (and decent) backup solution, likes of NetBackup or Data Protector, you can restore another server's (where you know the root password) /tcb/files/auth/r/root file onto this system and proceed form that point.

Hope this helps

________________________________
UNIX because I majored in cryptology...
Abdul Nazar
Occasional Advisor

Re: root password expired on 11.23

Hi Mel Burslan,


Thanks for your reply,

I know the old password,but when i do su to root,it is not asking for new password.just i am getting a message only.
$ su root
Password:
Last successful login for root: Sun Mar 27 10:30:37 IST-5:30 2011
Last unsuccessful login for root: Tue Mar 29 05:18:57 IST-5:30 2011
Your password has expired.
su: Password for root has expired. Choose new password and try again
su: Sorry
$




and my id dont have any sudo privilege to do su.....Please help me whether there is any other option or not.....
Bill Hassell
Honored Contributor

Re: root password expired on 11.23

You must now logon using the real console, not the Unix LAN. The console is usually restricted access and therefore gives more privileges like logging on with an expired root password.


Bill Hassell, sysadmin
Mel Burslan
Honored Contributor

Re: root password expired on 11.23

I am with Bill on this one. But if you do not have console access, cross your fingers and hope that you have a properly configured sudo to give you full root access.

sudo su -
enter your own password

whoami

can you see yourself as root or this one os also failing ?
If you are root, try hacking the encrypted password field. If not seek help from a backup/restore expert to restore the root's trusted user/password information entry container file as I tried to explain in my first response.

And make sure you have a console access if you are remotely located with respect to this server. "Console not configured" is not an acceptable excuse for a systems administrator. This is your last line of defense in most cases and you can not function without one.
________________________________
UNIX because I majored in cryptology...
Abdul Nazar
Occasional Advisor

Re: root password expired on 11.23

Hi all,

Thanks for the reply,we have configured the console and done the password reset,it is working fine now...
Abdul Nazar
Occasional Advisor

Re: root password expired on 11.23

issue has been resolved.....thanks all.