1745786 Members
3355 Online
108722 Solutions
New Discussion

Date of password expiry

 
SOLVED
Go to solution
chindi
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 9
Dennis Handly
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?

chindi
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 

Dennis Handly
Acclaimed Contributor

Re: Date of password expiry

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

chindi
Respected Contributor

Re: Date of password expiry

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.

Dennis Handly
Acclaimed Contributor
Solution

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)

 

 

 

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

 

chindi
Respected Contributor

Re: Date of password expiry

Thanks Dennis .

Dennis Handly
Acclaimed Contributor

Re: Date of password expiry

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

chindi
Respected Contributor

Re: Date of password expiry

Thanks :)