pwage-aix for IBM AIX servers

This is the password aging script for aix just completed. So far tested and still testing on one of our aix server running 5.3.0.0. So anyway as you can see it is very similar to pwage-hpux-T the only difference on aix /etc/passwd file looks in this format. Also for this script to work you need to have "+email@domain.com" at the end of your description in /etc/passwd file or the script won't work.

while encrypted password and password lastupdate date(in seconds) is stored in /etc/security/password with tabs in this format.

So we just need to find a way to grab the lastupdate field for that we can use command sed -n -e "/$i/"{n; n; p;}' , then from there find time from 1970 in seconds minus lastupdate get it in days subtract that with 90 day password aging policy to get the days to expiry then send email.

feel free to modify/tighten to your requirements. All comments are welcome. :slight_smile:

1 Like