nerdexam
Linux_Foundation

LFCS · Question #148

After modifying the indexes for a database in slapd.conf - and running slapindex - the slapd daemon refuses to start when its init script is called. What is the most likely cause of this?

The correct answer is D. The init script is starting slapd as an ordinary user, and the index files are owned by root. When slapindex is run as root, it creates index files with root ownership, which prevents slapd from starting if the init script attempts to run it as a less privileged user.

Submitted by joshua94· Apr 18, 2026Service Configuration

Question

After modifying the indexes for a database in slapd.conf - and running slapindex - the slapd daemon refuses to start when its init script is called. What is the most likely cause of this?

Options

  • AThe indexes are not compatible with the init script.
  • BThe init script cannot be run after executing slapindex, without first signing the indexes with slapsign.
  • CThe init script has identified one or more invalid indexes.
  • DThe init script is starting slapd as an ordinary user, and the index files are owned by root.

How the community answered

(31 responses)
  • A
    6% (2)
  • B
    6% (2)
  • C
    3% (1)
  • D
    84% (26)

Why each option

When `slapindex` is run as root, it creates index files with root ownership, which prevents `slapd` from starting if the init script attempts to run it as a less privileged user.

AThe indexes are not compatible with the init script.

Index compatibility with an init script is not a direct technical concern; the init script's primary role is to start the daemon, not to interact directly with index file formats.

BThe init script cannot be run after executing slapindex, without first signing the indexes with slapsign.

`slapsign` is not a standard OpenLDAP utility, nor is there a requirement to 'sign' indexes for `slapd` to start after `slapindex` has been run.

CThe init script has identified one or more invalid indexes.

While invalid indexes could prevent `slapd` from starting, `slapindex` itself is designed to build valid indexes based on the configuration; a more common post-`slapindex` issue with startup is file permissions, not often inherent index invalidity.

DThe init script is starting slapd as an ordinary user, and the index files are owned by root.Correct

If `slapindex` is executed as the root user, the generated index files will be owned by root; when the `slapd` daemon is subsequently started by its init script, it often runs as a non-privileged user (e.g., `ldap` or `openldap`) who would lack read/write permissions to these root-owned files, causing startup failure.

Concept tested: OpenLDAP index file permissions after slapindex

Source: https://www.openldap.org/doc/admin24/appendix-a.html#FileOwnership

Topics

#OpenLDAP#slapd#file permissions#daemon management

Community Discussion

No community discussion yet for this question.

Full LFCS Practice