System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Reset root password -- Trusted System

ManojK_1
Valued Contributor

Reset root password -- Trusted System

Hi All,

While restting password for root user in trusted HP Unix systems, it is asking for a Old password:

How can i eleminate this question (OLD password:) while resetting root password in HP Unix.

I know that i can remove password entry from the file /tcb/files/auth/r/root, so that it will not ask old password while resetting root password.

Manoj K


Thanks and Regards,
Manoj K
11 REPLIES
Ishwar_1
Frequent Advisor

Re: Reset root password -- Trusted System

Boot the System and interrupt it at boot Time :
1> Main Menu > bo pri

2> Interact with IPL(Y or N)?> y

3> ISL prompt type : hpux -is

This would take you into the Single user mode where u can change the password

4> Mount all the file System
mountall

5> Change the system to untrusted mode
/usr/lbin/tsconvert -r

6> Then edit the file /tcb/files/auth/r/root
make the passwd field null

7> After that reset password to your desire
passwd root

8> Once you have reset password you can turn the system to the Trusted mode
/usr/lbin/tsconvert -c
doug hosking
Esteemed Contributor

Re: Reset root password -- Trusted System

Ishwar, after step 5 the file you mention in step 6 will no longer exist. Also, there is no need for the tsconvert -r steps (which destroy valuable history, potentially including audit data). Beware that the boot sequence is different between PA-RISC and HP Integrity.

Manoj, if you have access to a superuser shell, try /sbin/passwd instead of /usr/bin/passwd. I no longer have access to HP-UX systems to test this, but seem to recall that /sbin/passwd would skip the "old password" prompt if run by a superuser. (This is one reason why permissions on /sbin/passwd don't let normal users run it.)
vishnu.khandare
Respected Contributor

Re: Reset root password -- Trusted System

Hi Manoj,

Yes ur going on right track..

go to file /tcb/files/auth/r/root and edit this file remove password entery tht is encrypted and remove the numaric values in tht file save and exit, then come to /tcb/files/auth/system/pwhist null the file pwhist_0.

If u follow this steps this will not ask for the old password while reset.

Hope this solves ur issues
Please assign points.

Thanks!!

Regards
Vishnu Khandare
You should deserve before U desire!!!!
Md. Minhaz Khan
Super Advisor

Re: Reset root password -- Trusted System

Dear Hi Manoj,

Below is the procedure,

Step 1:
=======
#cd /tcb/files/auth/r

Step 2:
=======
Delete the encrypt password"

#cp -p root xroot

# vi root
..........
...........
:u_pwd=LD0hwR/gGZssU:\ [change to :u_pwd=:\ ]

:wq!

#passwd root

New password:*****
Retype Password:****

Now try to login with new password as root

if success then remove xroot file

Thanks
Minhaz
ManojK_1
Valued Contributor

Re: Reset root password -- Trusted System

Hi All,

Thanks for the response.

I think my requirement is not clear. May be the way i have asked the question is wrong.

I don't want to restart my system for resetting root password. I just don't want the question "Old password:" while resetting root password. I clearly told in my first mail that i know the way to clear the password entry from "/tcb/files/auth/r/root". Apart from this if there is any way, if it is please let me know.

Hi Doug Hosking,
I have tried with /sbin/passwd but no luck.

Manoj K
Thanks and Regards,
Manoj K
vishnu.khandare
Respected Contributor

Re: Reset root password -- Trusted System

Hi Manoj,

Just go to pwhist file and make it null, the history file,

As i said earlier,

below is the passwd file of root,without numerice character,

root:u_name=root:u_id#0:\
:u_pwd=:\
:u_bootauth:u_auditid#:\
:u_auditflag#1:\
:u_minchg#:u_exp#:u_succhg#:u_unsucchg#:\
:u_pw_expire_warning#:u_pswduser=root:u_suclog#:u_unsuclog#:\
:u_unsuctty=console:u_lock@:chkent:




Do follow this it will not ask you for OLD password.
Try it. It will solves ur query.
Please do assign points.

Regards
Vishnu Khandare
You should deserve before U desire!!!!
ManojK_1
Valued Contributor

Re: Reset root password -- Trusted System

Hi Vishnu,

Why it is required to clear the file pwhist.
Changing the apssword entry from /tcb/files/auth/r/root is more than enough for not asking OLD Passwd:

Manoj K
Thanks and Regards,
Manoj K
vishnu.khandare
Respected Contributor

Re: Reset root password -- Trusted System

HI Manoj,

If you specify any password policy, that not to reuse the old password for X times, it will not allow u to set the same password.
Hence we must clear pwhist also.

Regards
Vishnu Khandare
You should deserve before U desire!!!!
ManojK_1
Valued Contributor

Re: Reset root password -- Trusted System

Hi,

That is not there in my requirement. I don't want to repeat the password.

Manoj K
Thanks and Regards,
Manoj K
vishnu.khandare
Respected Contributor

Re: Reset root password -- Trusted System

Hi Manoj,

In this scenario solution is in ur hand go ahead.


Regards
Vishnu Khandare
You should deserve before U desire!!!!
madhuchakkaravarthy
Trusted Contributor

Re: Reset root password -- Trusted System

hi

root:u_name=root:u_id#0:\
:u_pwd=:\
:u_bootauth:u_auditid#:\
:u_auditflag#1:\
:u_minchg#:u_exp#:u_succhg#:u_unsucchg#:\
:u_pw_expire_warning#:u_pswduser=root:u_suclog#:u_unsuclog#:\
:u_unsuctty=console:u_lock@:chkent:


editing in :u_pwd is enough to change the pwd in trusted system,by editing this it wont ask for old pwd.

we have to do such things if critical database are running , we cant reboot it in single user mode for such things, sometimes rules should be violated.


regards

MC