LFCS · Question #185
After an administrator added comments to each line of the ACLs in slapd.conf, the ACLs ceased to function properly. What is the most likely cause of this?
The correct answer is A. Comments cannot be used anywhere in an ACL block. If ACLs in slapd.conf cease to function after comments are added, the most likely cause is that comments are not permitted within ACL blocks or on the same line as an ACL rule in older OpenLDAP configurations. ACL directives require strict syntax without embedded comments to…
Question
Options
- AComments cannot be used anywhere in an ACL block.
- BThe comments were not added using the semi-colon (;) character.
- CComments cannot be used in the slapd.conf file.
- DThe comments were not added using the pound (#) character.
How the community answered
(24 responses)- A88% (21)
- B4% (1)
- C8% (2)
Why each option
If ACLs in `slapd.conf` cease to function after comments are added, the most likely cause is that comments are not permitted within ACL blocks or on the same line as an ACL rule in older OpenLDAP configurations. ACL directives require strict syntax without embedded comments to parse correctly.
In OpenLDAP `slapd.conf` files, particularly in older versions, ACL blocks enforce a strict syntax. Placing comments directly within an ACL rule, or even on a separate line but inside a multi-line rule definition, can cause parsing errors and prevent the entire ACL from being applied correctly.
The pound (`#`) character is the correct way to denote comments in `slapd.conf`; the issue is typically *where* comments are placed, not the character used.
Comments can be used in `slapd.conf` on their own lines using the `#` character; the problem arises when they interfere with the strict syntax of certain configuration blocks like ACLs.
The pound (`#`) character is the correct comment character in `slapd.conf`; if comments were added, it is assumed the correct character was used, making the placement the issue.
Concept tested: OpenLDAP slapd.conf ACL comment syntax
Source: http://www.zytrax.com/books/ldap/ch6/slapd-config.html#access
Topics
Community Discussion
No community discussion yet for this question.