[Freeipa-users] Account Expiration

James James jreg2k at gmail.com
Wed Feb 13 20:31:50 UTC 2013


thanks for your code. :)


2013/2/13 Jan-Frode Myklebust <janfrode at tanso.net>

> On Wed, Feb 13, 2013 at 09:29:42AM +0100, Petr Spacek wrote:
> > >
> > >Yeah, I don't think we want to be in the business of installing and
> > >configuring an MTA. However, we should be able to detect if one is
> available
> > >and use it if it is. I think it would be reasonable to restrict it to
> LMTP
> > >with a Unix domain socket (most MTA's support this). Then our config
> would
> > >have a LMTP domain socket pathname, if that pathname exists and we can
> connect
> > >to it we use, if not we fallback to not generating any mail.
> >
> > In meanwhile, it should be relatively simple to code script which
> > does ldapsearch from time to time and sends some e-mails. This
> > script doesn't have to run on the same server as IPA, only access to
> > LDAP and some MTA is required.
>
> Crude, but a start:
>
> ----------------------------------------------------------------
> #! /bin/bash
> ldapsearch -z 500 -x -h ipa1.example.net -b
> cn=users,cn=accounts,dc=example,dc=net "(krbPasswordExpiration<=$(date
> +%Y%m%d --date='+1 week')000000Z)" mail |grep ^mail|cut -d: -f2 |while read
> mail
> do
>         echo password expires in less than a week | mail -s "Password
> expires" $mail
> done
> ----------------------------------------------------------------
>
>
>
>   -jf
>
> _______________________________________________
> Freeipa-users mailing list
> Freeipa-users at redhat.com
> https://www.redhat.com/mailman/listinfo/freeipa-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-users/attachments/20130213/781252f9/attachment.htm>


More information about the Freeipa-users mailing list