Operating System - HP-UX
1748165 Members
3653 Online
108758 Solutions
New Discussion юеВ

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