AIX password expiration notification / script with emailer!
09-01-10
I created this script out of frustration at work due to people using different systems to access the AIX box and not getting told that their password was due to expire. I then modified it later to then lookup the email address within Windows Active Directory and email the user, finally sending an email to myself with a list of users due to expire and any email addresses it couldn’t find. It expects that AIX username and Windows username are both the same.
It is written for Korn Shell (AIX Standard) and uses Perl for the time translation and some “bc” maths. Its not the most elegant of scripts but it works. It has two parts – One is the main script to run as a cron job etc (root privilidges required) click here, the second part is a Perl script which requires Perl modules “Convert-ASN1-0.22″ and “perl-ldap-0.39″ click here for download. You will need to change some lines within both scripts but I have noted where changes need to made. Then setup checkpasswordexpire.ksh as cronjob and you should be away laughing!
Tags: Active Directory, AIX, korn shell, ksh, perl, scripts, tips, UNIX
Hi,
I found your article about AIX password expiration notification http://www.cammckenzie.com/blog/aix-password-expiration-notification-script-with-emailer .
I try to download scripts checkpasswordexpire.ksh and retrieveemailaddressfromad.perl, but it ends with Error 404 – Not Found.
Thank you for help
Brambo
This is not good, I’ll see if I can find them for you.
Hi – I have fixed the broken symlinks. Hopefully you find the script useful. Looking over it, its quiet a mess and could be tidied up but it does the job.