LX0-104 · 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.. The slapd daemon failing to start after index modification and slapindex usually indicates a file permission issue where the slapindex command, often run as root, creates files that the slapd daemon's less privileged user cannot access.
Question
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
(47 responses)- A28% (13)
- B6% (3)
- C19% (9)
- D47% (22)
Why each option
The `slapd` daemon failing to start after index modification and `slapindex` usually indicates a file permission issue where the `slapindex` command, often run as root, creates files that the `slapd` daemon's less privileged user cannot access.
Index compatibility is typically handled by `slapd` itself, not an 'init script' specifically, and indexes generally conform to the database backend.
There is no standard `slapsign` utility or requirement to 'sign' indexes for `slapd` to start; this concept is not part of OpenLDAP indexing.
While invalid indexes can cause `slapd` startup issues, the `slapindex` command itself usually reports errors if indexes are fundamentally invalid or malformed during its execution, making a silent failure from the init script less likely than a permissions issue.
When `slapindex` is executed, often by a root user, it creates or modifies index files within the OpenLDAP database directory; if these new files are owned by root and lack read/write permissions for the `slapd` daemon's operating user (e.g., `ldap`), the daemon will fail to start due to insufficient permissions to access its own database.
Concept tested: OpenLDAP file permissions and daemon startup
Topics
Community Discussion
No community discussion yet for this question.