Hello –
We run an entirely 100% mac shop with an OSX Server running 10.6.3 and 25 iMac 10.6.3 clients. They are all bound to the server for authentication and everything is great. However I need a script that will email my users 10 days prior to their password expiring and every day past that mark until they change their password. I got wind that you can check a users password expiration by running
pwpolicy -u testuser -n /LDAPv3/myserver.example.com –get-effective-policy
However I am unsure how to go about writing a script to actually take the variables out of the string that you get when you run this to actually trigger a sendmail. I would ideally like this to be bash, and to run on the server as a cronjob. Any help is appreciated as far as I can tell there is no commercial solution so this will benefit anyone in my position or perhaps persuade more people to use OD instead of AD for authentication.
Jon