BladeSystem Forums have moved here
To make BladeSystem information easier to find, we have moved the BladeSystem forums here, to Servers and Operating Systems.
Showing results for 
Search instead for 
Do you mean 

Date of password expiry

SOLVED
Go to Solution
Highlighted
Respected Contributor

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 .

9 REPLIES
Acclaimed Contributor

Re: Date of password expiry

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

Which post doesn't work for you?

Respected Contributor

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

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?)

Respected Contributor

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

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)

 

 

 

Respected Contributor

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: .

 

Respected Contributor

Re: Date of password expiry

Thanks Dennis .

Acclaimed Contributor

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)

Respected Contributor

Re: Date of password expiry

Thanks :)