The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to check password expiry in AIX? SanjayPasum AIX 5 01-04-2009 02:29 PM
Certificate Expiry Dates srujana HP-UX 1 06-16-2008 01:35 AM
How to set an non-expiry in HP-Unix bullz26 HP-UX 2 02-29-2008 07:08 AM
passwd expiry bullz26 SUN Solaris 2 02-23-2008 08:53 PM
password expiry big123456 UNIX for Advanced & Expert Users 2 01-14-2006 12:12 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-10-2008
DILEEP410 DILEEP410 is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 148
Post 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 (permalink)  
Old 12-10-2008
Autocross.US's Avatar
Autocross.US Autocross.US is offline
Registered User
  
 

Join Date: Nov 2008
Location: Chesapeake, VA
Posts: 73
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.
Closed Thread

Bookmarks

Tags
shell script, shell scripting, unix scripting, unix scripting basics

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0