比較バージョン

キー

  • この行は追加されました。
  • この行は削除されました。
  • 書式設定が変更されました。

...

OpenLDAPは、バージョンによって設定の方法が変わっています。バージョン2.2まではslapd.confに設定内容を定義していましたが、バージョン2.3以降で非推奨となりディレクトリサービス上に設定を格納するようになりました。
CentOS 5標準のOpenLDAPは2.2までのslapd.confによる設定方法を採っています。
CentOS 6標準のOpenLDAPは26と7標準のOpenLDAPは2.3以降の、ディレクトリサービス上での設定を基本としています。
以下ではCentOS 6を想定してディレクトリサービス上に設定する方法で記述しています。CentOS 5をご使用の場合は適宜読み替えてください。7を想定してディレクトリサービス上に設定する方法で記述しています。CentOS 6や5をご使用の場合は適宜読み替えてください。

 

...

0. OpenLDAPパッケージの確認

/etc/openldap/schema ディレクトリが存在しない場合は、以下のようにしてOpenLDAPパッケージをインストールしてください。

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
# yum install openldap-clients openldap-servers

インストール後、自動起動の設定を行います。

パネル
borderColor#cccccc
bgColor#eeeeee
titleBGColor#ffffff
titleCentOS7の場合
borderStylesolid
# systemctl enable slapd
展開
titleCentOS6の場合
パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
# chkconfig --level 345 slapd on

...

 

...

1. 追加のスキーマファイル

以下のURLには、edupersonスキーマの内容が記載されています。
/etc/openldap/schema 配下に「eduperson.schema」を作成し、スキーマの内容をコピーしてください。
※edupersonスキーマの追加は必須ではありません。
(既に統合認証基盤が構築されており、必要な属性値が存在する場合など)

...

・LDAPサーバの起動
  事前に起動させておく必要があります。

パネル
borderColor#cccccc
bgColor#eeeeee
titleBGColor#ffffff
titleCentOS7の場合
borderStylesolid
# systemctl start slapd
展開
titleCentOS6の場合
パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
# service slapd start

 ・データベースの設定

  初期登録されている既存のドメイン情報を変更して、使用します。
  以下のような内容で、ドメイン情報変更用のldifファイルを作成します。

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
dn: olcDatabase={1}monitor,cn=config
changetype: modify
replace: olcAccess
olcAccess: {0}to *  by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read  by dn.base="cn=olmgr,o=test_o,dc=ac,c=JP" read  by * none

dn: olcDatabase={2}bdbhdb,cn=config
changetype: modify
replace: olcSuffix
olcSuffix: o=test_o,dc=ac,c=JP		←suffix
-
replace: olcRootDN
olcRootDN: cn=olmgr,o=test_o,dc=ac,c=JP	←rootdn
-
add: olcRootPW
olcRootPW: {CRYPT}$6$6e4.Of8k69uRYHNq$MxtzkEmGh7sFN7hdumuXyx8PsHqNCs3Mf9sdRcAytz3xs7sbZGathb9G5oc/vrm1zOc7kwVZScy02SJxDGDs60		←rootパスワード(暗号化したもの)

...

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
dn: o=test_o,dc=ac,c=JP
objectClass: organization
o: test_o

dn: ou=Test Unit1,o=test_o,dc=ac,c=JP objectClass: organizationalUnit ou: Test Unit1 dn: ou=Test Unit2,o=test_o,dc=ac,c=JP objectClass: organizationalUnit ou: Test Unit2 dn: ou=Test Unit3,o=test_o,dc=ac,c=JP objectClass: organizationalUnit ou: Test Unit3 dn: uid=test001,ou=Test Unit1,o=test_o,dc=ac,c=JP objectClass: eduPerson objectClass: inetOrgPerson uid: test001 ou: Test Unit1 ou;lang-ja: テスト001_学部1 sn: test001_sn sn;lang-ja: テスト001_sn cn: test001_cn userPassword: test001 givenName: test001_givenname givenName;lang-ja: テスト001_givenname displayName: test001_displayname displayName;lang-ja: テスト001_displayname mail: test001_email@nii.ac.jp eduPersonAffiliation: member employeeNumber: 0001

dn: uid=test002,ou=Test Unit2,o=test_o,dc=ac,c=JP objectClass: eduPerson objectClass: inetOrgPerson uid: test002 ou: Test Unit2 ou;lang-ja: テスト002_学部2 sn: test002_sn sn;lang-ja: テスト002_sn cn: test002_cn userPassword: test002 givenName: test002_givenname givenName;lang-ja: テスト002_givenname displayName: test002_displayname displayName;lang-ja: テスト002_displayname mail: test002_email@nii.ac.jp eduPersonAffiliation: faculty employeeNumber: 0002

dn: uid=test003,ou=Test Unit3,o=test_o,dc=ac,c=JP objectClass: eduPerson objectClass: inetOrgPerson uid: test003 ou: Test Unit3 ou;lang-ja: テスト003_学部3 sn: test003_sn sn;lang-ja: テスト003_sn cn: test003_cn userPassword: test003 givenName: test003_givenname givenName;lang-ja: テスト003_givenname displayName: test003_displayname displayName;lang-ja: テスト003_displayname mail: test003_email@nii.ac.jp eduPersonAffiliation: student
employeeNumber: 0003 

・LDAPへの登録

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
# ldapadd -x -h localhost -D "cn=olmgr,o=test_o,dc=ac,c=JP" -w csildap -f test.ldif

...