[Fedora-directory-users] mass delete : size limit problem

Mikael Kermorgant mikael.kermorgant at gmail.com
Wed Apr 12 09:22:07 UTC 2006


Hello,

I'd like to run a script that deletes everything from ou=People (~ 5000
users).
The problem is that I first run a search and the result size is limited by
the server.

Increasing thiis limit would surely work but I don't find it very elegant.
Do you see another solution ?

Thanks in advance,

--
Mikael Kermorgant

PS : My script does the following :


retrieveAttributes = [ "entrydn" ]
searchFilter = "(uid=*)"

ldap_result_id = l.search(baseDN, searchScope, searchFilter,
retrieveAttributes)
while 1:
    result_type, result_data = l.result(ldap_result_id, 0)
    if (result_data == []):
        break
    else:
        if result_type == ldap.RES_SEARCH_ENTRY:
            print result_data[0][1]['entrydn'][0] + ' deleted'
            l.delete_s(result_data[0][1]['entrydn'][0])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-directory-users/attachments/20060412/356fa5b5/attachment.htm>


More information about the Fedora-directory-users mailing list