Delete or Modify LDAP Entries

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

 About This Book

 Introduction to Linux Systems

 Cockpit - Web Portal for Administrator

 Process Management

 Files and Directories

 Users and Groups

 File Systems

 Block Devices and Partitions

 LVM (Logical Volume Manager)

 Installing CentOS

 SELinux - Security-Enhanced Linux

 Network Connection on CentOS

 Software Package Manager on CentOS - DNF and YUM

 Running Apache Web Server (httpd) on Linux Systems

 Running PHP Scripts on Linux Systems

 Running MySQL Database Server on Linux Systems

 Running Python Scripts on Linux Systems

 vsftpd - Very Secure FTP Daemon

 Postfix - Mail Transport Agent (MTA)

 Dovecot - IMAP and POP3 Server

 Email Client Tools - Mail User Agents (MUA)

LDAP (Lightweight Directory Access Protocol)

 What Is LDAP

 What Is OpenLDAP

 Install OpenLDAP Server on CentOS

 Configure OpenLDAP Server on CentOS

 Use OpenLDAP Client Tools

Delete or Modify LDAP Entries

 LDIF File Format

 Hierarchical Structure of LDAP Entries

 Install OpenLDAP Server on CentOS 8

 GCC - C/C++ Compiler

 Graphics Environments on Linux

 Conda - Environment and Package Manager

 Tools and Utilities

 Administrative Tasks

 References

 Full Version in PDF/EPUB