LDAPのDN・検索・LDIFと変更3 / 4

LDIFでentryを追加

次は既存のou=People,dc=example,dc=testの下へ追加するwhitepagesの例で、inetOrgPerson schemaと管理者のwrite権限が必要である。

dn: uid=alice,ou=People,dc=example,dc=test
objectClass: inetOrgPerson
uid: alice
cn: Alice Example
sn: Example
mail: alice@example.test

alice.ldifからentryを追加する例である。

ldapadd -x -H ldaps://ldap.example.test -D 'cn=admin,dc=example,dc=test' -W -f alice.ldif

LDIFはattribute:valueの形式で、空行でentryを分け、行頭spaceは前行の継続に使う。::はBase64表現、:<は外部URLからの値等の指定に関わる。Base64は暗号化ではない。

学習パスへ
参考資料