LX0-104 · Question #164
An administrator is adding several LDIF files to the directory with slapadd, and the new entries are not displayed when ldapsearch is used. Assuming that there is no database corruption, what is the m
The correct answer is A. Stop the slapd process and add the files again with slapadd.. If slapadd entries are not displayed by ldapsearch, the most appropriate solution is to stop the slapd daemon, re-add the files, and then restart slapd to ensure consistency and proper indexing.
Question
Options
- AStop the slapd process and add the files again with slapadd.
- BRun slaprefresh_all.
- CRun ldaprefresh_all.
- DStop the slapd process, run slapindex, and then correct the entries using slap_vacuum.
How the community answered
(44 responses)- A84% (37)
- B2% (1)
- C9% (4)
- D5% (2)
Why each option
If `slapadd` entries are not displayed by `ldapsearch`, the most appropriate solution is to stop the `slapd` daemon, re-add the files, and then restart `slapd` to ensure consistency and proper indexing.
The `slapadd` utility directly modifies the OpenLDAP database files and should ideally be executed while the `slapd` daemon is stopped. If `slapd` was running during `slapadd`, its indexes might become out of sync or it might not recognize the new entries immediately, thus stopping it and re-adding ensures the database is updated consistently and `slapd` re-initializes correctly upon restart.
There is no standard `slaprefresh_all` command in OpenLDAP for refreshing the daemon's awareness of database changes.
There is no standard `ldaprefresh_all` command in OpenLDAP to refresh directory entries.
`slap_vacuum` is not a standard OpenLDAP command for database maintenance or correction; while `slapindex` regenerates indexes, stopping `slapd` and re-adding addresses the core issue of `slapadd`'s offline operation.
Concept tested: OpenLDAP slapadd and slapd synchronization
Source: https://www.openldap.org/doc/admin24/backends.html
Topics
Community Discussion
No community discussion yet for this question.