AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
  • 1.  notification mail when password expired

    Posted Tue January 29, 2008 03:20 AM

    Originally posted by: SystemAdmin


    Hallo, can anybody help me with my issue? I´d like to know if it is possible to send me a mail (to @ibm.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.
    #AIX-Forum


  • 2.  Re: notification mail when password expired

    Posted Tue January 29, 2008 11:30 AM

    Originally posted by: alethad


    If you use this user id often enough you can set the parameter to send you a warning but it's only delivered whenever you log in. Otherwise you'll probably need to write a script to check/work with the pwdwarntime for that particular user id , if you can. I've not done it myself maybe someone else has.
    Just 2 cents.
    Good Luck.
    #AIX-Forum


  • 3.  Re: notification mail when password expired

    Posted Wed January 30, 2008 02:28 AM

    Originally posted by: SystemAdmin


    Yep script, this option is possible, I hope. I´ll ask my scriptgurucoleague :o). Thank You
    #AIX-Forum


  • 4.  Re: notification mail when password expired

    Posted Mon February 04, 2008 10:30 AM

    Originally posted by: tony.evans


    As long as you run the script from root, you can do this reasonably easily.

    You can use "lsuser -a maxage <user id>" to get the max age and convert it to seconds (something like "maxage_seconds=$(( ${maxage} * 7 * 24 * 60 * 60 ))" ), get the last updated time using "pwdadm -q <user id> | grep lastupdate", and then do some basic maths to work out when it's going to (or if it has already) expired.

    Only root (by default) can run the pwdadm command and get the lastupdated value.

    You can't even do it for your own account (by default).
    #AIX-Forum