• Contact Us
  • Home
  • Reference

What is LDIF?

Learn about LDIF, or Lightweight Data Interchange Format, a standard plain text data interchange format for representing and exchanging directory information. Understand how LDIF files are structured and used in LDAP systems.

Written by Seaghan McNelis

Updated at July 27th, 2024

  • Quick Start
  • Installation
    Best Practices Configuration Troubleshooting Design Performance Platform
  • Maintenance
    Releases Upgrade
  • Reference
+ More

Table of Contents

LDIF Fields Adding Entries Modifying Entries Deleting Entries Replacing Entry Attributes: Renaming Entries Moving Entries Adding Image or Audio Files to User Accounts

The LDAP Data Interchange Format (LDIF) serves as a standard plain text format for representing LDAP directory content. Each entry in the LDAP directory is represented as a record in LDIF format, facilitating the description of directory objects and any modifications that need to be made.

LDIF Fields

  • DN (Distinguished Name): Uniquely identifies an entry in the directory.
  • DC (Domain Component): Represents each component of the domain.
  • OU (Organizational Unit): Denotes the organizational unit or user group.
  • CN (Common Name): Refers to the individual object being queried.

Using Switches to Modify, Add, and Remove Entries using LDIF

Adding Entries

dn: uid=jsmith1,ou=People,dc=example,dc=com
changetype: add
objectClass: inetOrgPerson
description: John Smith from Accounting. John is the project manager of the building project, so contact him with any questions.
cn: John Smith
sn: Smith
uid: jsmith1

Modifying Entries

dn: uid=sbrown20, ou=People,dc=example,dc=com
changetype: modify
add: mail
mail: sbrown@example.com

Deleting Entries

dn: ou=othergroup,dc=example,dc=com
changetype: delete

Replacing Entry Attributes:

dn: uid=sbrown20,ou=People,dc=example,dc=com
changetype: modify
replace: mail
mail: sbrown2@example.com

Renaming Entries

dn: uid=sbrown20,ou=People,dc=example,dc=com
changetype: modrdn
newrdn: uid=sbrown200
deleteoldrdn: 0

Moving Entries

dn: uid=sbrown2,ou=People,dc=example,dc=com
changetype: modrdn
newrdn: uid=sbrown2
deleteoldrdn: 0
newsuperior: ou=superusers,dc=example,dc=com

Adding Image or Audio Files to User Accounts

dn: uid=jsmith1,ou=People,dc=example,dc=com
changetype: modify
add: jpegPhoto
jpegPhoto:< file:///tmp/john.jpg
dn: uid=jsmith1,ou=People,dc=example,dc=com 
changetype: modify 
add: audio 
audio:< file:///tmp/hellojohn.mp3

 

Copyright © 2020-2024 Symas Corporation. All rights reserved.
format ldap data

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Using OpenLDAP with DEX
  • Using OpenLDAP with ejabberd
  • Chaining Overlay with Keep Alive Function
  • Symas Blog RSS Feed
  • Symas on Facebook
  • Symas on Twitter
  • Symas Blog
  • Symas on LinkedIn
  • Symas YouTube Channel

Copyright © 2023, Symas Corporation. All rights reserved. Privacy Statement (updated July 31, 2023)

Phone:

Main Office: +1.650.963.7601
Fax: +1.650.390.6284

Email:

Sales: sales@symas.com
Support: support@symas.com

Office Hours:

8:00 AM - 5:00 PM ET

Office Location:

Symas Corporation
PO Box 391
Grand Junction, CO 81507 USA

Expand