expiry of a linux id?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting expiry of a linux id?
# 1  
Old 12-10-2008
Java expiry of a linux id?

Hi,

Can anyone suggest, how or from where we can understand the expiry time of a linux id, whether login or ftp?

My concern is like, i want to know when the ftpid configured on an automated system will expire, so that i can configure some notice or email mentioning that the particular id is close to expiry.

Your help is appreciated and thanks in advance.


With Regards
Dileep Pattayath
# 2  
Old 12-10-2008
The password expiration information is stored in /etc/shadow. A typical entry may look like this:

testuser:$1$DgtYUQyf$AbAvYwwEqSJHnsmCcfUg6/:14139:7:90:14:::

The bold number is the days since Jan 1, 1970 that password was last changed. 'man 5 shadow' for what the other fields are. You could write a shell/perl script to parse out these values and do some math to determine the actual day and then email on a certain condition (email user 14 days before password expiration, for example). This would require setting up .forward files or aliases for your users though.

The easiest way to see when a password is going to expire is to run 'chage -l USERNAME' from the command line.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Java expiry information

Hi, I have a requirement to check the expiry date of Java software installed in linux servers. We are using the below Java java version "1.8.0_51" Java(TM) SE Runtime Environment (build 1.8.0_51-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode) I am not sure... (3 Replies)
Discussion started by: nextStep
3 Replies

2. Shell Programming and Scripting

Expiry users in Linux

Hi folks, Need a bash shell script to find the expiry users in next 5 days in Linux using the command chage and dump the output to another file (1 Reply)
Discussion started by: gsiva
1 Replies

3. Shell Programming and Scripting

passwd expiry notification

Hi, I'm trying to set password expiry notification. But unable to do so. >I do not have permission for "passwd -s" on Sun OS(SunOS 5.9 Generic_122300-60 sun4u sparc SUNW,Sun-Fire-480R). >Also tried "chage -l <username>" but it is not configured. I'm just an appln user in that system. Could... (2 Replies)
Discussion started by: sam_bd
2 Replies

4. AIX

User expiry

Hi When a new user is created and their password is set to require changing at first login, is it possible to expire the account if they don't login whithin 10 days ? Thanks Nigel (4 Replies)
Discussion started by: garwoon
4 Replies

5. Solaris

disable password expiry

Hi How do i disable password expiration on ldap? It runs on Solaris 10 machine. Thanks in advance. (3 Replies)
Discussion started by: hrist
3 Replies

6. UNIX for Advanced & Expert Users

expiry date for files?

Hi, Is there any way i can give an expiry date for files that i create? For example, i would like to get a file deleted automatically after 60 days from the creation date. Is there any possibility for this in Unix? Thanks, RRVARMA (3 Replies)
Discussion started by: RRVARMA
3 Replies

7. Shell Programming and Scripting

password expiry notification

Hi, Could someone please let me know how to write script for passwd expiry notification on salaries boxes. Regards Dnyan (1 Reply)
Discussion started by: dnyan
1 Replies

8. HP-UX

Certificate Expiry Dates

Hi, we are having the installed cerificates in our unix server's. The certificates are in following format : cacert.pem,cert8.db,ois294.sem,CertGenCAKey.der,ss_keystore.jks So i want to know the Expiry date for these certificates. how to get the valid FROM to TO dates for these kind of... (1 Reply)
Discussion started by: srujana
1 Replies

9. Solaris

passwd expiry

any one can help me from where this command passwd -s root fetching from...? so that i can write the script for cheking root password expiry which are expiring before 2 days and sent a mail... Please give me the script if u have....! :b: Solaris any version... (2 Replies)
Discussion started by: bullz26
2 Replies

10. UNIX for Advanced & Expert Users

password expiry

Hi, under SUN Unix, in which file the expiry date of a user password is indicated ? Many thanks. (2 Replies)
Discussion started by: big123456
2 Replies
Login or Register to Ask a Question