Advertisements

HP-UX: root password expired in a trusted system

There is an HP-UX system that had the root password expired

user@linux:~ $ ssh root@hp-ux
Last successful login for root: Mon Apr 1 13:01:33 BRA3BDT 2013
Last unsuccessful login for root: Mon Apr 1 13:02:14 BRA3BDT 2013
Your password has expired.
Last login: Mon Apr 1 13:01:33 2013 from 172.16.4.198
Changing password for root
Old password:
Sorry.

I was unable to change the password since it is not known

root@hp-ux:/root # passwd root
Changing password for root
Old password:
Sorry.

Since there is no /etc/shadow file because this is a trusted system, to delete the root password you go to the /tcb/files/auth/r/root and delete the password from the :u_pwd attribute

root@hp-ux:/tcb/files/auth/r # cat root
root:u_name=root:u_id#0:\
:u_pwd=2576d348b7120d068cf812db81d2a414:\
:u_bootauth:u_auditid#0:\
:u_auditflag#1:\
:u_succhg#1348864982:u_unsucchg#1364832324:u_pswduser=root:u_suclog#1364832138:\
:u_unsuclog#1364832144:u_numunsuclog#1:u_maxtries#0:u_lock@:\
:chkent:

Then you should not have a problem to change the password

root@hp-ux:/tcb/files/auth/r # passwd root
Changing password for root
Last successful password change for root: Fri Sep 28 17:43:02 2012
Last unsuccessful password change for root: Mon Apr 1 13:05:24 2013

Do you want (choose one letter only):
pronounceable passwords generated for you (g)
a string of letters generated (l) ?
to pick your passwords (p) ?

Enter choice here: p
New password:
Re-enter new password:
Passwd successfully changed

Advertisements
%d bloggers like this: