Re: Date of password expiry (335 Views)
Reply
Valued Contributor
chindi
Posts: 399
Registered: ‎07-24-2008
Message 1 of 10 (424 Views)
Accepted Solution

Date of password expiry

hi ,

 

I follwed this link , but am facing problem , not able to get date of password expiry .

 

 

http://h30499.www3.hp.com/t5/General/password-on-hpux-11i/m-p/3600133#M111889

 

 

for hpux 11iv2 .

Acclaimed Contributor
Dennis Handly
Posts: 25,430
Registered: ‎03-06-2006
Message 2 of 10 (414 Views)

Re: Date of password expiry

What type of password security do you have?  Standard, Trusted or SMSE?

Which post doesn't work for you?

Valued Contributor
chindi
Posts: 399
Registered: ‎07-24-2008
Message 3 of 10 (411 Views)

Re: Date of password expiry

Its trusted.

Script is attached herewith.

 

User tef has 29 days left until password expires
User tef last changed the password on: Wed Aug 7 14:02:55 2013.
User tef - password will expire on: .

 

Not able to grep date 

Acclaimed Contributor
Dennis Handly
Posts: 25,430
Registered: ‎03-06-2006
Message 4 of 10 (406 Views)

Re: Date of password expiry

[ Edited ]

>Not able to find date

 

Most likely this line:

expire_date=$(echo 0d${exp_date}=Y | adb | cut -c 3-13)

 Change to:

expire_date=$(echo 0d${exp_date}=Y | adb -o | cut -c 3-13)

 

(I'm surprised if they are using perl, why bother to use adb?)

Valued Contributor
chindi
Posts: 399
Registered: ‎07-24-2008
Message 5 of 10 (392 Views)

Re: Date of password expiry

[ Edited ]

Hi Dennis ,

 

 

User tef has 29 days left until password expires
User tef last changed the password on: Wed Aug 7 14:02:55 2013.
User tef - password will expire on: .

 

 

Its still the same.

Acclaimed Contributor
Dennis Handly
Posts: 25,430
Registered: ‎03-06-2006
Message 6 of 10 (376 Views)

Re: Date of password expiry

>It's still the same.

 

Ok, then we need to debug what that step is doing.   Add some debugging echoes:
echo 0d${exp_date}=Y

echo 0d${exp_date}=Y | adb -o

echo 0d${exp_date}=Y | adb -o | cut -c 3-13

expire_date=$(echo 0d${exp_date}=Y | adb -o | cut -c 3-13)

 

 

 

Valued Contributor
chindi
Posts: 399
Registered: ‎07-24-2008
Message 7 of 10 (363 Views)

Re: Date of password expiry

Hi Dennis ,

 

User tef does not have password aging enabled.
0d1378456375=Y
2013 Sep 6 14:02:55


User tef has 25 days left until password expires
User tef last changed the password on: Wed Aug 7 14:02:55 2013.
User tef - password will expire on: .

 

Valued Contributor
chindi
Posts: 399
Registered: ‎07-24-2008
Message 8 of 10 (346 Views)

Re: Date of password expiry

Thanks Dennis .

Acclaimed Contributor
Dennis Handly
Posts: 25,430
Registered: ‎03-06-2006
Message 9 of 10 (342 Views)

Re: Date of password expiry

[ Edited ]

>2013 Sep 6 14:02:55

 

Are you sure there wasn't lots of leading spaces?  :-)

 

>User tef - password will expire on: .

 

Ok, it appears when adb was changed, it also replaced the two leading tabs by 16 spaces.

So change the line to:

expire_date=$(echo 0d${exp_date}=Y | adb -o | cut -c 17-27)

Valued Contributor
chindi
Posts: 399
Registered: ‎07-24-2008
Message 10 of 10 (335 Views)

Re: Date of password expiry

Thanks :)
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.