LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-13-2007, 03:32 AM   #1
bhandu
LQ Newbie
 
Registered: Mar 2006
Posts: 22

Rep: Reputation: 15
Exclamation Shell script for password expiry alert


I want to write a shell script for following scenario

1. My login's password will expire in 10, so after 10 days I will have to change my password.
2. But I want to have a password expiry alert before 20 days of my password expiry telling me that my password will expire in 10 days. So I will have a buffer of 10 days and I will never go in the password expiry period as I will be changing the password 10 days before its actual expiration.
3. So I want to write a shell script for the above scenario.
4. Also let me know how to execute this script or where to place the script so that my login will get this alert 20 days before expiry of the password.
 
Old 06-13-2007, 04:19 AM   #2
brianmcgee
Member
 
Registered: Jun 2007
Location: Munich, Germany
Distribution: RHEL, CentOS, Fedora, SLES (...)
Posts: 399

Rep: Reputation: 38
This is already implemented in /etc/shadow you will find that setting at "warn":

Code:
username:passwd:last:may:must:warn:expire:disable:reserved
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
password expiry notification through mail? dsids Linux - Security 1 06-02-2006 03:00 PM
password expiry notification through mail? dsids Linux - Newbie 2 06-02-2006 02:48 PM
SAmba Password Expiry bally Linux - General 0 11-29-2004 10:42 PM
how to produce pop-up message box / alert window from shell script peb Linux - Newbie 3 02-25-2004 03:14 AM
Password expiry klmn1 Linux - Networking 0 12-29-2002 10:29 PM


All times are GMT -5. The time now is 12:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration