[python-ldap] Programmatically enable/disable LDAP users from Python?

Chris Dukes chris.dukes.aix at gmail.com
Wed Nov 28 04:48:45 CET 2012


You're going to have to read up on ACLs for the LDAP server you're using.

I suspect that you're failing to bind as a privileged user as you did 
not mention it in your email.  dsutil defaults to $LDAP_ADMIN_USER or 
cn=Directory Manager, and may further abuse a connection to localhost to 
determine authority.


On 11/27/2012 10:37 PM, Carolyn Lanser wrote:
>
> I would like to programmatically enable/disable LDAP user accounts. 
> From the command prompt I can use dsutil and this apparently 
> sets/removes the nsAccountLock operational attribute. I have attempted 
> to do modify_s() to set and remove this attribute from w/in Python but 
> always get the following error message: "Insufficient 'write' 
> privilege to the 'nsAccountLock' attribute of entry ''".
>
> Is there a way to set/remove/add operational attributes or otherwise 
> enable/disable ldap users programmatically through Python?
>
> Thanks, C
>
>
>
> _______________________________________________
> python-ldap mailing list
> python-ldap at python.org
> http://mail.python.org/mailman/listinfo/python-ldap

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20121127/f2aebbd4/attachment.html>


More information about the python-ldap mailing list