Re: Date of password expiry (73 Views)
Reply
Valued Contributor
chindi
Posts: 339
Registered: ‎07-24-2008
Message 1 of 10 (162 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 .

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,705
Registered: ‎03-06-2006
Message 2 of 10 (152 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?

Please use plain text.
Valued Contributor
chindi
Posts: 339
Registered: ‎07-24-2008
Message 3 of 10 (149 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 

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,705
Registered: ‎03-06-2006
Message 4 of 10 (144 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?)

Please use plain text.
Valued Contributor
chindi
Posts: 339
Registered: ‎07-24-2008
Message 5 of 10 (130 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.

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,705
Registered: ‎03-06-2006
Message 6 of 10 (114 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)

 

 

 

Please use plain text.
Valued Contributor
chindi
Posts: 339
Registered: ‎07-24-2008
Message 7 of 10 (101 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: .

 

Please use plain text.
Valued Contributor
chindi
Posts: 339
Registered: ‎07-24-2008
Message 8 of 10 (84 Views)

Re: Date of password expiry

Thanks Dennis .

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,705
Registered: ‎03-06-2006
Message 9 of 10 (80 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)

Please use plain text.
Valued Contributor
chindi
Posts: 339
Registered: ‎07-24-2008
Message 10 of 10 (73 Views)

Re: Date of password expiry

Thanks :)
Please use plain text.
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