How do I delete one attribute in LDAP with LDIF? I an trying to delete uniqueMember: cn=jsmith,ou=users,dc=s2rsolutions,dc=com
can someone please show me the LDIF to do it?
dn: cn=USER,ou=groups,dc=s2rsolutions,dc=com objectClass: groupOfUniqueNames cn: USER uniqueMember: cn=jsmith,ou=users,dc=s2rsolutions,dc=com uniqueMember: cn=guest,ou=users,dc=s2rsolutions,dc=com uniqueMember: cn=admin,ou=users,dc=s2rsolutions,dc=com uniqueMember: cn=ford,ou=users,dc=s2rsolutions,dc=com
You can use ldapmodify and ldapdelete to remove entries from the directory. The ldapmodify command removes entries and attributes by using the LDIF update statements changetype:delete and changetype:modify with the delete attribute, respectively. The ldapdelete tool removes only entries.
Steps. Use the ldapsearch tool to locate a specific entry. Use the ldapmodify command to change attributes from the command line. Specify the modification using the changetype:modify directive, and then specify which attributes are to be changes using the add and replace directive.
2.2 LDIF Format for Deleting Entries. When deleting an entry, the LDIF file entry only needs the DN of the entry to be deleted and the changetype: delete directive. Use an empty line at the end of the entry as a separator.
Removing Users To delete a user entry, perform the following steps: Access the Administration Server and choose the Users and Groups tab. Display the user entry as described in Finding User Information. Click Remove User (key file and digest file) or Delete User (LDAP).
dn: cn=USER,ou=groups,dc=s2rsolutions,dc=com changetype: modify delete: uniqueMember uniqueMember: cn=jsmith,ou=users,dc=s2rsolutions,dc=com
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With