Novell Home

Deleting objects from eDirectory using LDAP and Python

From Developer Community

This simple function shows how to delete an object from eDirectory using Python and python-ldap. The object to delete is identified by the full distinguished name. Parameters: handle - A connection handle as returned by __connect. dn - String representation of the dn of the object to delete.

Function

import ldap

def __delete( handle, dn ):
    if not handle:
        return False
    handle.delete_s( dn )

--Matt Ryan

© 2008 Novell, Inc. All Rights Reserved.