nerdexam
CompTIA

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.

Administrative Tasks

Question

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 most appropriate solution to the problem?

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)
  • A
    84% (37)
  • B
    2% (1)
  • C
    9% (4)
  • D
    5% (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.

AStop the slapd process and add the files again with slapadd.Correct

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.

BRun slaprefresh_all.

There is no standard `slaprefresh_all` command in OpenLDAP for refreshing the daemon's awareness of database changes.

CRun ldaprefresh_all.

There is no standard `ldaprefresh_all` command in OpenLDAP to refresh directory entries.

DStop the slapd process, run slapindex, and then correct the entries using slap_vacuum.

`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

#OpenLDAP administration#slapadd#LDAP troubleshooting#LDIF files

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice