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.
Question
Options
- Aslapadd < example.ldif
- Bslapadd example.ldif
- Cslapadd -f example.ldif
- Dslapadd -F example.ldif
How the community answered
(26 responses)- A88% (23)
- B4% (1)
- C4% (1)
- D4% (1)
Why each option
This question tests the correct syntax for using the `slapadd` command to import an LDIF file into an OpenLDAP directory.
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.
`slapadd` does not accept the LDIF filename as a direct argument for input; it expects to read from standard input.
The `-f` option for `slapadd` is used to specify an alternative `slapd.conf` configuration file, not the input LDIF file.
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
Community Discussion
No community discussion yet for this question.