HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to know Password Expiry Date?

 
Vidhya B
Frequent Advisor

How to know Password Expiry Date?

Hi all,

I need to know how to find the Password Expiry date of a user. I am using trusted system. It will be better if we get warning before the password expiry. So, If there is a way by which I can find the Password expiry date of all the users, then I can write a script to send mail to them before the password gets expired.

Thanks in Advance.
12 REPLIES
Jorge Pons
Trusted Contributor

Re: How to know Password Expiry Date?

Hi

Can you try with:

passwd -sa

Regards, Jorge
sangilak
Trusted Contributor

Re: How to know Password Expiry Date?

Hi,


Have a look at the thread below, they discuss a similar question:

http://h30499.www3.hp.com/t5/System-Administration/Notification-of-expiring-password/m-p/3379791#M197300

sangilak

Manix
Honored Contributor

Re: How to know Password Expiry Date?

Please have a look at this.

http://www.tek-tips.com/viewthread.cfm?qid=299751&page=4

Thanks
Manix
HP-UX been always lovable - Mani Kalra
Vidhya B
Frequent Advisor

Re: How to know Password Expiry Date?

Hi all,

Thankyou for all your replies.

I have read this in the man page of logins.

-a Display two account expiration fields. The fields show how long
the account can be unused (in days) before it becomes inactive
and the date the account will expire.



This is my output of logins -a :

vidhya 111 users 20
-1 000000


Username=vidhya
uid=111
group=users
gid=20
This is what I understood from this output.

Kindly tell me how to read this output. What -1 and 000000 mean?

Will this help me in finding the password expiry date?

Thanks in Advance.
Shibin_2
Honored Contributor

Re: How to know Password Expiry Date?

It seems your account is disabled for password aging ( -1 ). If it was enabled, it will show the number days instead of 0000.
Regards
Shibin
P Arumugavel
Respected Contributor

Re: How to know Password Expiry Date?

Manix
Honored Contributor

Re: How to know Password Expiry Date?

I can see the output for "logins -a " for all the active users as you posted , AFAIK it looks
that parameters are not set in /etc/default/security.

Thanks
Manix
HP-UX been always lovable - Mani Kalra
Vidhya B
Frequent Advisor

Re: How to know Password Expiry Date?

Hi all,

I have set the password ageing for the user 'vidhya' using passwd command.

Here is my output:

#logins -x -l vidhya
vidhya 111 users 20
/home/vidhya
/sbin/sh
PS 021611 7 35 7

Can anyone tell me what is meant by 021611? Is that anything related to expiry date?

Even after this I am getting the same output for logins -a:

#logins -a
vidhya 111 users 20
-1 000000


Kindly help me with this. Thanks in Advance!!


P Arumugavel
Respected Contributor

Re: How to know Password Expiry Date?

>> Can anyone tell me what is meant by 021611? Is that anything related to expiry date?

no, it is not related to expiry date. It represents the date of last password change (16th Feb 2011).

Rest fields refer the required number of days between the changes. and the number of days allowed between changes.

>> #logins -a
vidhya 111 users 20
-1 000000

These fields (-1) show how long the account can be unused (in days) before it becomes inactive and (000000) the date the account will expire.

Rgds...

Vidhya B
Frequent Advisor

Re: How to know Password Expiry Date?

Hi,

>> #logins -a
vidhya 111 users 20
-1 000000

>>These fields (-1) show how long the account can be unused (in days) before it becomes inactive and (000000) the date the account will expire.

Then why is not my expiry date got displayed? Is there anything else I should do to get the date there? Because I have enabled the password ageing already. Please help me with this.



Vidhya B
Frequent Advisor

Re: How to know Password Expiry Date?

Hi all,

We are using trusted system. Please tell me anyway where I can find password expiry date.


Thanks in Advance!!!
P Arumugavel
Respected Contributor

Re: How to know Password Expiry Date?