389 Directory Server に base entry を登録する手順です。LDAP では suffix だけ作成しても、実際に参照する OU、ユーザー、グループの入れ物がなければ運用できません。
参考
書籍
書籍
参考書籍
LDAP – 設定・管理・プログラミング
LDAP の基礎、ディレクトリ設計、検索、認証連携を体系的に確認したい場合の参考書籍です。価格や在庫はリンク先で確認してください。
Amazon で見るこのリンクは Amazon アソシエイトリンクです。
389 Directory Server シリーズ
前の記事: Ubuntu 22.04 389 Directory Server #2 – TLS 有効化と LDAPS 設定
次の記事: Ubuntu 22.04 389 Directory Server #4 – BIND ユーザーとアクセス制御
base entry の考え方
base entry は、ディレクトリツリーの土台です。例として、ユーザー用の ou=users、グループ用の ou=groups、サービスアカウント用の ou=service を作成します。
| DN | 用途 |
| dc=example,dc=local | LDAP ツリーの基点 |
| ou=users,dc=example,dc=local | ユーザーを格納する |
| ou=groups,dc=example,dc=local | グループを格納する |
| ou=service,dc=example,dc=local | BIND ユーザーなどを格納する |
LDIF の作成
cat <<'EOF' > /tmp/base-entry.ldif
dn: dc=example,dc=local
objectClass: top
objectClass: domain
dc: example
dn: ou=users,dc=example,dc=local
objectClass: top
objectClass: organizationalUnit
ou: users
dn: ou=groups,dc=example,dc=local
objectClass: top
objectClass: organizationalUnit
ou: groups
dn: ou=service,dc=example,dc=local
objectClass: top
objectClass: organizationalUnit
ou: service
EOF登録
ldapadd -x -H ldaps://ldap.example.local -D 'cn=Directory Manager' -W -f /tmp/base-entry.ldif確認
ldapsearch -x -H ldaps://ldap.example.local -b dc=example,dc=local '(objectClass=organizationalUnit)' dnまとめ
base entry は LDAP 設計の骨格です。Samba、Postfix、SSSD などから参照する前に、ユーザー、グループ、サービスアカウントの置き場所を明確にしておくと後続の設定が読みやすくなります。
Ubuntu 22.04 389 Directory Server #3 – ベースエントリーの登録


