Check User's Password Expiry

Posted On // Leave a Comment

Check user's password for expiry and notify Admin.

In Our daly jobs its really hard to manage users password and maintain the expiry of password so lets have a look at scenario which i face was really tough to tackle 

Scenario: 

               Jhon was an  S1 users at our organization, I hope you all got the power S1 users, One day he came to my cabin and start firing on me i was really confuse whats wrong happens with him, Then he told me whats this bullshit with my account is not able to log-in, quickly i checked on my Linux box and found that his account was locked and password was expire so genuinely i told him  the same sudddenly he loss his temper and said what the bullshit is this i didn't even get notify before expiry, So it clicked on my mind and got this solution 

Solution :

Suddenly after hours of working i come up with a this script  and solve my issue.

So whats going here i written a script and schedule a job in cron so what script is giving me that is really wonderful. Script will Notify me the password will expire in next two days and keep notify till the password expire date.

 Script Output:

Script: 



Credit : Vijayan Karunakaran