<div dir="ltr"><div>Hi,</div><div><br></div>Neat little dirty rework but it appears that the framework took all the fun out of learning Python-LDAP away. ;)<div><br></div><div>I think I keep the current codebase of my tool as it is and do a fork from it to run as a IPA plugin. I will on later date submit that for a contrib review when it is as complete as the standalone version is now.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 15 November 2013 10:22, Alexander Bokovoy <span dir="ltr"><<a href="mailto:abokovoy@redhat.com" target="_blank">abokovoy@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, 15 Nov 2013, Antti Peltonen wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
On 14 November 2013 21:06, Dmitri Pal <<a href="mailto:dpal@redhat.com" target="_blank">dpal@redhat.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A quick look at the tool's command line indicates that it is probably not<br>
using any of the IPA framework and rather goes over LDAP. I am not sure<br>
that this is the best approach, let us discuss...<br>
</blockquote>
<br>
Could you please point me towards to some documentation on howto implement<br>
this tool with IPA framework or should I just go and read some code? :)<br>
</blockquote></div>
You can start with <a href="http://abbra.fedorapeople.org/guide.html" target="_blank">http://abbra.fedorapeople.org/<u></u>guide.html</a><br>
<br>
Attached is a simple rewrite of your code that I did in ~30 minutes or<br>
so. Just drop it into ipalib/plugins (/usr/lib/python2.7/site-<u></u>packages/ipalib/plugins/user_<u></u>addon.py on my<br>
Fedora 19 VM) and restart the server. There is a lot to polish there<br>
(unrelated options need to be masked/removed, better handling of expire<br>
option, etc.) but it works by providing you a list of users whose passwords<br>
did expire:<br>
<br>
$ LANG=en_US.utf8 ipa user-find-expire  --expire=20150201000000<br>
-----------------<br>
1 account matched<br>
-----------------<br>
  User login: admin<br>
  Full name: Administrator<br>
  Expire date: 20140211151057Z<br>
----------------------------<br>
Number of entries returned 1<br>
----------------------------<br>
<br>
Also worth noting, the way IPA framework is built, the same file must<br>
present at the client where 'ipa' utility is being run -- we do so by<br>
packaging all ipalib/plugins/* to a freeipa-python subpackage and then<br>
freeipa-admintools simply requiring it.<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
-- <br>
/ Alexander Bokovoy<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Antti Peltonen | Homo sapiens | planet Earth<br>blog <a href="http://bcow.me" target="_blank">http://bcow.me</a> | email <a href="mailto:antti.peltonen@iki.fi" target="_blank">antti.peltonen@iki.f</a>i<div>
irc bcow@IRCNet,Freenode</div></div>
</div>