LFCS · 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. To add content from an LDIF file to the LDAP directory using slapadd, the file's content is typically redirected to the command's standard input.
Question
Options
- Aslapadd < example.ldif
- Bslapadd example.ldif
- Cslapadd -f example.ldif
- Dslapadd -F example.ldif
How the community answered
(19 responses)- A95% (18)
- C5% (1)
Why each option
To add content from an LDIF file to the LDAP directory using `slapadd`, the file's content is typically redirected to the command's standard input.
The slapadd command, by default, reads the LDIF entries to be added from standard input, making redirection using the '<' operator the correct method to feed the content of example.ldif into the command.
Providing the filename directly as an argument without redirection or a flag is not the standard way for slapadd to read LDIF input.
The -f option is used to specify the configuration file for slapd, not the input LDIF file for slapadd.
The -F option is used to specify the configuration directory for slapd, not the input LDIF file for slapadd.
Concept tested: OpenLDAP slapadd input method
Source: http://www.openldap.org/doc/admin/slapadd.html
Topics
Community Discussion
No community discussion yet for this question.