Softerra LDAP Administrator HelpShow AllHide All

Using LDIF Editor

Launching LDIF Editor

There are several ways to open an LDIF file in LDIF Editor. To do so:

  • Create a new LDIF document (from the File menu, click New, and then click New LDIF Document).

  • Open existing LDIF document (from the File menu, click Open). To view recently opened LDIF documents, select Recent Files from File menu.

  • If *.ldif or *.ldf extension is already associated with LDAP Administrator, double click on the file in Windows Explorer and it will be opened in LDAP Administrator.

Basic Features

LDIF Editor has several commands and convenient features to facilitate the editing of LDIF documents.

  • Syntax Coloring

    In order to make the reading of LDIF documents an easy process, LDIF Editor supports syntax coloring based on the LDIF format. Each logical element in LDIF documents has its own color. Text containing syntax errors is underlined with wavy lines similar to the squiggles in Microsoft Word.

    To customize the LDIF Editor coloring schema:

    • Select Options from the Tools menu, and then go to the LDIF Files page.

    • Press the Edit Coloring Scheme button.

    • Change font, size, foreground and background colors as you like. See Edit Coloring Scheme for more details.

  • IntelliSense

    To accelerate typing of LDIF documents, LDIF Editor provides autocompletion capabilities like IntelliSense. IntelliSense detects what part of LDIF document is editing and basing on the LDIF format suggests you with a list of possible LDIF keywords, attribute names, attribute values and other strings that could be inserted into the document. The IntelliSense window appears automatically, when you type first characters of the word that can occur in the current context. You can "force" IntelliSense to show its pop-up list by using the Ctrl+Enter shortcut or selecting the IntelliSense command from the LDIF Editor’s context menu.

    LDIF Editor allows you to improve the performance of Intellisense by extending it with LDAP attributes from the LDAP server schema. To do so, click the Apply Schema button on the LDIF Editor toolbar, and in the dialog that opens, select the LDAP server profile, from which the schema will be retrieved.

  • Text Outlining

    LDIF documents can be rather big and could contain lots of records describing directory entries or modifications of entries. Outlining allows you to collapse records to the entry DNs, which makes viewing and navigating through the document significantly easier. If the outlining feature is enabled, each LDIF record in a document is marked as a separate block. There is a minus sign , located to the left from the each block. This text block can be hidden under a single line by pressing this sign. After the text is outlined, it appears as:

    The outlined text block is not deleted; it is merely hidden from view.

    You can then expand the hidden text block back by double clicking on it or clicking the plus sign , located to the left from the collapsed block.

    In the Outlining submenu of the LDIF Editor’s context menu, the following commands are available:

    • Collapse/Expand Block – hides/shows the currently selected LDIF record.

    • Collapse All – hides all LDIF records in the document.

    • Expand All – shows all LDIF records in the document.

    The outlining is enabled by default, but you can disable it at the LDIF Files options page.

  • Undo/Redo

    These functions allow you to easily correct mistakes, as well as free you to experiment with different text editing. Undo reverses the last action you performed, and Redo undoes the last Undo action. You can call Undo/Redo using the LDIF Editor context menu, or using the keyboard shortcuts inside LDIF Editor (Ctrl+Z for Undo and Ctrl+Y for Redo).

  • Document Navigation

    LDIF Editor allows you to quickly locate an LDAP entry or a set of changes made to an LDAP entry contained in a document by its DN. To do so, you can use the Navigation control that is located on the LDIF Editor toolbar.

    The Navigation control contains a list of entry DNs described in the current LDIF document. All Navigation control list items are sorted in the alphabetical order. Select item in the list to navigate to the selected LDAP entry. To filter Navigation control list by DNs that contain a certain text, enter this text to the Navigation control editbox.

    Press Ctrl+N to switch to the Navigation control from LDIF Editor.

Find, Replace, Go To dialogs

LDIF Editor allows you to quickly find and replace text as well as jump to a specific part of text contained in the document.

To search for every occurrence of a specific word or phrase: 

  • Activate the editor and press Ctrl+F.

  • In the Find what box, type the text you want to search for.

  • To find next instance of a word or phrase, click Find Next.

  • To find the next occurence of the text within LDIF Editor press F3, to go to the previous one press Shift+F3.

To find and automatically replace a text with another one: 

  • Activate the editor and press Ctrl+H.

  • In the Find what box, type the text you want to search for.

  • In the Replace with box, type the replacement text.

  • Do one of the following:

    • To find the next occurrence of the text, click Find Next.

    • To replace an occurrence of the text, click Replace. After you click Replace, LDIF Editor moves to the next occurrence of the text.

    • To replace all occurrences of the text, click Replace All.

To use a Regular Expression for Find and Replace, click the Regular Expression check box.

To go to a specific line number: 

  • Activate the editor and press Ctrl+G.

  • In the Line number, enter the number of the line you want to move to.

  • Press the OK button to move to the certain line.

Executing LDIF Files

To import LDIF document you are editing, click the Execute LDIF button on the LDIF Editor toolbar or press Ctrl+Shift+E. The Import Data wizard will be launched.

The wizard comprises two steps: 

  1. LDAP Server. On this page, you need to select the LDAP server you want to import file LDIF document to. After selecting the server, you will be able to click Import or Next to proceed to the Document Extra Options.

  2. Document Extra Options. At this step, you are supposed to choose some extra document options. For more information about these options, see Document Extra Options.

Data import may take quite a long time. To track import progress, use the Importing Data dialog displayed in the right-hand bottom corner of the screen. To abort the data import, click Stop inside the dialog or Stop Operation on the Standard toolbar.

You can also import not the whole document, but only one LDIF record. To do so, put the cursor inside the LDIF record you want to import and select Import Record... command from the context menu or press Ctrl+E.

See Also