We have Ubuntu workstations(10.04 to 13.04) joined to a Samba Domain Controller with winbind and PAM modules.
Login is not possible in GDM when the users password is in expiration state. The issue is clearly described here: https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/613371
What I need is a script that:
* Checks password expiration date and, if its 7 days or less, alert the user.
* Launch a dialog to change the user password(you could use zenity, xdialog, etc or just run an interactive shell prompt)
The script could be written in any language but should run on Ubuntu desktops from 10.04 to 13.04 and 100% of its software dependencies must be available on Ubunut official repositories