notification mail when password expired


 
Thread Tools Search this Thread
Operating Systems AIX notification mail when password expired
# 1  
Old 01-29-2008
notification mail when password expired

Hallo, can anybody help me with my issue? I´d like to know if it is possible to send me a mail (to @mail.com for example) when some account password will expired? eg. few days ago of this expiration. We don´t use this account every day, it is used for DB2 and DB2 has problem every 90´s day because his password expired.

Thank You.
# 2  
Old 01-29-2008
cat the file : "/etc/security/user" and look at its usage, especially "pwdwarntime"
# 3  
Old 01-31-2008
issue the command "pwdadm -q <username>" as root to get an output similar to the following:

Code:
# pwdadm -q nobody
nobody: 
        lastupdate = 1192452222

The lastupdate value shows the time the password was last changed and is in "seconds passed since Jan 1st 1970"-forma. It is extracted from the file /etc/security/passwd. You can:

either set the value there directly (add 86400 every day or something such);

change the maxage attribute of the user account to "-1" to never let the password expire;

Both these methods are only available if you have root access to the system. If you only have user rights you have no possibility to find out how old your password already is. Do the following:

create an alias for the "passwd" command (put that into your ~/.kshrc) , which does the following: first call a script and have it write a date information to a file, then call the normal /usr/bin/passwd. This way you can maintain your own age information about the last password change. The information could be used to issue a mail (via a cron job) whenever the expiration date is near.

I hope this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Change Expired root Password

Hello everybody, hope you all are having a good day. Here is our (my) situation... We have a process where we clone Solaris 8 hard disk drives then have to configure each drive for the system they will be used in. In the old cloning image the root password never expired. We also have... (7 Replies)
Discussion started by: Wrongway
7 Replies

2. Shell Programming and Scripting

Sftp - password change / expired

What happens to sftp when unix password expires / changes ? Do we need to regenerate keys again ? Please help. (3 Replies)
Discussion started by: vegasluxor
3 Replies

3. Solaris

Never Expired for root password

Never expired for root password Guy's I want to change the setting to keep the root password to be nerved expired! Please advice with the sitting! (9 Replies)
Discussion started by: top.level
9 Replies

4. UNIX for Dummies Questions & Answers

Request for change password when expired

Hello folks, I have few linux machines and one server from which I can connect to others without password (of course ssh key). On some server when root password will expired is asking me for change passord but on some servers no. When I can find some configuration of this behavior? Thx for any... (1 Reply)
Discussion started by: vikus
1 Replies

5. Solaris

Two questions on renew the expired password

Recently, the root pass expired on a Solaris box. And then, i can't log into the system anymore.....Below are two issues i met: 1. I tried to login the system via telnet and ssh. Only the ssh prompt me to set a new password. The system only told me that the pass is expired and turn it off during... (1 Reply)
Discussion started by: sleepy_11
1 Replies

6. UNIX for Dummies Questions & Answers

Password Expired - cfmupdatenode issue

Afternoon All Has anyone seen this type of thing before. Basically we had an issue where an ID that has db2 connect access tried to make the db connection and got an " Attempt to establish connection failed with security reason "1" ("PASSWORD EXPIRED"). SQLSTATE=08001" error. This I know... (0 Replies)
Discussion started by: philib
0 Replies

7. UNIX for Advanced & Expert Users

password expired

Hi When i try to login with my username/password i get the following message 'Password for user 'lmathew' has expired - use passwd(1) to update it' please let me know what to do Thanks in advane Ammu (2 Replies)
Discussion started by: ammu
2 Replies

8. Solaris

expired root password

We have expiration set on the root password for 30 days. the only way to login as root remotley is login as another user and then su as root. I logged in to the machine today tried to su as root, and got the message password has expired, use passwd to change but i cant get in as root.. If... (1 Reply)
Discussion started by: csaunders
1 Replies

9. AIX

AIX Non Expired Password

Hi, I am into production support and handling some of the AIX servers. We are planning to have a user id on a AIX system with non-expired password. Now the question is that if I have a non expired password then I cannot do a interactive login to AIX machine ( i:e cannot do Telnet ,SSH etc)... (0 Replies)
Discussion started by: siddhhuu
0 Replies

10. Cybersecurity

Sending a message to a user when password will be expired

Hi, Does anyone have a script (for AIX) that sends a message to a user that his password will be expired within 5 days for ex. Thanks (1 Reply)
Discussion started by: Diederd
1 Replies
Login or Register to Ask a Question