Linux Tutorials - Herong's Tutorial Examples - v5.45, by Herong Yang
Delete or Modify LDAP Entries
This section provides a tutorial example on how to delete or modify LDAP entries remotely.
How To Delete a LDAP Entry? You can use the "ldapdelete" command to delete a single entry or multiple entries.
1. Delete a single entry using "ldapdelete ... <dn>" command.
herong$ ldapdelete -x -D "cn=Manager,dc=herongyang,dc=com" -w TopSecret \ -H ldap://192.168.1.100 "cn=Joe Doe,ou=IT,dc=herongyang,dc=com"
2. Delete multiple entries provided in a LDIF file.
herong$ vi old.ldif dn: cn=Joe Doe,ou=IT,dc=herongyang,dc=com changetype: delete dn: cn=Bob Lee,ou=IT,dc=herongyang,dc=com changetype: delete herong$ ldapdelete -x -D "cn=Manager,dc=herongyang,dc=com" -w TopSecret \ -H ldap://192.168.1.100 -f old.ldif
How To Modify a LDAP Entry? You can use the "ldapmodify" command to modify multiple entries provided in a LDIF file.
herong$ vi outdated.ldif dn: cn=Joe Doe,ou=IT,dc=herongyang,dc=com changetype: modify replace: sn sn: Kim dn: cn=Bob Lee,ou=IT,dc=herongyang,dc=com changetype: modify replace: mail mail: bob_lee@herongyang.com
Table of Contents
Cockpit - Web Portal for Administrator
SELinux - Security-Enhanced Linux
SSH Protocol and ssh/scp Commands
Software Package Manager on CentOS - DNF and YUM
vsftpd - Very Secure FTP Daemon
►LDAP (Lightweight Directory Access Protocol)
Install OpenLDAP Server on CentOS
Configure OpenLDAP Server on CentOS
►Delete or Modify LDAP Entries
Hierarchical Structure of LDAP Entries
Install OpenLDAP Server on CentOS 8
Configure Mozilla Thunderbird to Use LDAP
LDAP Attributes Mapping in Mozilla Thunderbird