Sponsored Content
Full Discussion: Check password age
Top Forums Shell Programming and Scripting Check password age Post 302100177 by Tornado on Monday 18th of December 2006 03:35:29 AM
Old 12-18-2006
Check password age

Hi Guys,

I hope one of you has already done this and is kind enough to share your script with me.

I have a Solaris8 server that uses password aging for its local user accounts. I need a script that checks the age of the password and then sends the user an email if the password is about to expire. It needs to send an email when the password will expire in 10 days then it needs to send a second email when there is 5 days left before it expires. It also needs to send an email to an admin account if a password has already expired, including the root password.

Thanks...
Tornado
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

password check

Hi While using Pipe concept ,if a user enters a "login name" and "paswword" ,then how does a child process check for user password is correct or not and give notification to parent process. (1 Reply)
Discussion started by: riya
1 Replies

2. Solaris

password complexity check

Hi, I am looking for a simple way to : - force the user to change his password following the first connexion - check the complexity of a password (password should has a least 8 characters with 1 special char and 1 alpha...). Thinks for your help (1 Reply)
Discussion started by: dbsora
1 Replies

3. Solaris

How to set Root password age limit in Solaris 9/10

Hi Friends, Can anyone tell me how can I set the password age limit for root user to 14 days....??? Also would like to add following for root password; min-alpha --- 4 min-other --- 1 min-length -- 6 min-diff ----- 3 How can I do these on command line....??? Regards, jumadhiya (7 Replies)
Discussion started by: jumadhiya
7 Replies

4. AIX

"password min age" setting

How do you change default setting on password expiration field? My default setting has 15 weeks for "password min age", and I would like it to be 0 for all of my current users as well as futures users created. I guess there's a default file that I need to update, but I don't know where it is.... (2 Replies)
Discussion started by: pdtak
2 Replies

5. Shell Programming and Scripting

How can I check that a password is correct?

Hi there, There's something I don't understand. The same string does not give the same md5 hash everytime. I wanted to find a way to check someone's password but the following script obviously shows that it's not possible that way : ks354286:~# user=foo ks354286:~# pw=$(mkpasswd -H md5... (3 Replies)
Discussion started by: chebarbudo
3 Replies

6. Red Hat

max age password question

Hi All, I got a definition on /etc/login.defs PASS_MAX_DAYS 41 and on /etc/shadow, most of the user id fifth column (max age) is 40. Is that different policy or not? If it is the same policy, then the above policy don't match, right. Thanks for any comment you may add. Cheers,... (2 Replies)
Discussion started by: itik
2 Replies

7. UNIX for Dummies Questions & Answers

Check password strength

For moderator: I made a new thread in a proper part of the forum now https://www.unix.com/homework-coursework-questions/137119-user-processes.html But now i wan't to make something which isn't related to a homework, so i hope you won't close this one. Thanks to those two answers, you helped me!... (9 Replies)
Discussion started by: petel1
9 Replies

8. Solaris

Check when password expires

How do I check to see when a password expires on a user account with using the CLI? (1 Reply)
Discussion started by: jastanle84
1 Replies

9. Shell Programming and Scripting

how to check for valid password

I need to check if an account has a valid password. Would something like this work? read ACCNAME if grep -q "^$ACCNAME:\$6:" /etc/shadow; thenI noticed every entry in my shadow file that has a password starts with $6 ... it works for my current setup, but would it always work? I can't test... (4 Replies)
Discussion started by: ADay2Long
4 Replies

10. Shell Programming and Scripting

Check age of the file

hi, i am working on a shell script where i have 2 files & i need to check age of those files. one file should be of the same day and other shoudn't be more then 20 days old. how could i acheive this? please help!!!! (10 Replies)
Discussion started by: lovelysethii
10 Replies
lchage(1)						      General Commands Manual							 lchage(1)

NAME
lchage - Display or change user password policy SYNOPSIS
lchage [OPTION]... user DESCRIPTION
Displays or allows changing password policy of user. OPTIONS
-d, --date=days Set the date of last password change to days after Jan 1 1970. Set days to -1 to disable password expiration (i.e. to ignore --mindays, and --maxdays and related settings). Set days to 0 to enforce password change on next login. (This also disables password expiration until the password is changed.) -E, --expire=days Set the account expiration date to days after Jan 1 1970. Set days to -1 to disable account expiration. -i, --interactive Ask all questions when connecting to the user database, even if default answers are set up in libuser configuration. -I, --inactive=days Disable the account after days after password expires (after the user is required to change the password). Set days to -1 to keep the account enabled indefinitely after password expiration. -l, --list Only list current user's policy and make no changes. -m, --mindays=days Require at least days days between password changes. Set days to 0 or -1 to disable this requirement. If this value is larger than the value set by --maxdays, the user cannot change the pasword. -M, --maxdays=days Require changing the password after days since last password change. Set days to -1 to disable password expiration. -W, --warndays=days Start warning the user days before password expires (before the user is required to change the password). Set days to 0 or -1 to disable the warning. EXIT STATUS
The exit status is 0 on success, nonzero on error. NOTES
Note that "account expiration" (set by --expire) is distinct from "password expiration" (set by --maxdays). Account expiration happens on a fixed date regardless of password changes. Password expiration is relative to the date of last password change. libuser Nov 8 2012 lchage(1)
All times are GMT -4. The time now is 07:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy