Lazy Diary @ Hatena Blog

PowerShell / Java / miscellaneous things about software development, Tips & Gochas. CC BY-SA 4.0/Apache License 2.0

LDAP の設定でハマる

  • LDAP サーバ slapd の設定ファイル slapd.conf では、設定が書いてあるのと同じ行にコメントを入れることができないことがあるようだ。

この行は別にエラーにはならなかった。

include         /etc/ldap/schema/samba.schema   # added by user 

このコメントはエラーになった。

access to *
        by dn="cn=admin,dc=example,dc=com" write
        by self write   # added by user
        by * read 

という設定を書いて sudo /etc/init.d/slapd restart とすると、なんか生々しいエラーメッセージが出る。

/etc/ldap/slapd.conf: line 95: expecting "to" or "by" got "#" 
 ::= access to  [ by   [  ] ]+ ... (以下省略)