nerdexam
CompTIA

LX0-104 · Question #172

The administrator wants to add the content from an LDIF file named example.ldif to the LDAP directory. Which of the following commands will perform this task?

The correct answer is A. slapadd < example.ldif. This question tests the correct syntax for using the slapadd command to import an LDIF file into an OpenLDAP directory.

Administrative Tasks

Question

The administrator wants to add the content from an LDIF file named example.ldif to the LDAP directory. Which of the following commands will perform this task?

Options

  • Aslapadd < example.ldif
  • Bslapadd example.ldif
  • Cslapadd -f example.ldif
  • Dslapadd -F example.ldif

How the community answered

(26 responses)
  • A
    88% (23)
  • B
    4% (1)
  • C
    4% (1)
  • D
    4% (1)

Why each option

This question tests the correct syntax for using the `slapadd` command to import an LDIF file into an OpenLDAP directory.

Aslapadd < example.ldifCorrect

The `slapadd` command reads LDIF data from standard input by default, so redirecting the content of `example.ldif` using the `<` operator is the correct way to feed the file's content to the command.

Bslapadd example.ldif

`slapadd` does not accept the LDIF filename as a direct argument for input; it expects to read from standard input.

Cslapadd -f example.ldif

The `-f` option for `slapadd` is used to specify an alternative `slapd.conf` configuration file, not the input LDIF file.

Dslapadd -F example.ldif

The `-F` option for `slapadd` is used to specify an alternative configuration directory for dynamic `slapd` configuration, not the input LDIF file.

Concept tested: OpenLDAP slapadd command input methods

Source: https://www.openldap.org/doc/admin24/tools.html

Topics

#slapadd#LDIF import#Command-line syntax

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice