2: 2011-01-07 (金) 00:46:54 maruo  |
現: 2011-01-11 (火) 01:09:44 maruo  |
| | include /etc/openldap/schema/inetorgperson.schema | | include /etc/openldap/schema/inetorgperson.schema |
| | include /etc/openldap/schema/nis.schema | | include /etc/openldap/schema/nis.schema |
| | + | |
| | Uncomment modulepath and hdb module | | Uncomment modulepath and hdb module |
| | # Load dynamic backend modules: | | # Load dynamic backend modules: |
| | # moduleload back_meta.so | | # moduleload back_meta.so |
| | # moduleload back_dnssrv.so | | # moduleload back_dnssrv.so |
| | + | |
| | # Uncomment sample access restrictions (Note: maintain indentation!) | | # Uncomment sample access restrictions (Note: maintain indentation!) |
| | access to * | | access to * |
| | by users read | | by users read |
| | by anonymous auth | | by anonymous auth |
| | + | |
| | # BDB Database definition | | # BDB Database definition |
| | + | |
| | database hdb | | database hdb |
| | suffix "dc=example,dc=com" | | suffix "dc=example,dc=com" |
| | directory /var/lib/openldap-data | | directory /var/lib/openldap-data |
| | index objectClass eq | | index objectClass eq |
| | + | |
| | TLSCertificateFile /etc/openldap/ssl/ldap.pem | | TLSCertificateFile /etc/openldap/ssl/ldap.pem |
| | TLSCertificateKeyFile /etc/openldap/ssl/ldap.key | | TLSCertificateKeyFile /etc/openldap/ssl/ldap.key |
| | :include|このサーバで使用するスキーマを指定いたします。 | | :include|このサーバで使用するスキーマを指定いたします。 |
| | :moduleload|サーバで使用する機能のエクステンションモジュールを指定します。 | | :moduleload|サーバで使用する機能のエクステンションモジュールを指定します。 |
| - | :access to|データにアクセスする際の権限。アクセスリストを指定します。これは、[[LDAPアクセスリスト設定>Gentoo Linuxな生活/LDAPアクセスリスト設定]]で詳しく記載します。 | + | :access to|データにアクセスする際の権限。アクセスリストを指定します。これは、[[LDAPのセキュリティ設定>Gentoo Linuxな生活/LDAPのセキュリティ設定]]で詳しく記載します。 |
| | :database|LDAPで使用するDBバックエンドです。hdbはBerklayDBを指定しています。 | | :database|LDAPで使用するDBバックエンドです。hdbはBerklayDBを指定しています。 |
| | :suffix|ツリーの起点となるドメイン名を指定します。example.comはdc=example,dc=comと文節ごとに分けて記載します。LDAPの記載ルールです。 | | :suffix|ツリーの起点となるドメイン名を指定します。example.comはdc=example,dc=comと文節ごとに分けて記載します。LDAPの記載ルールです。 |
| | :index|データベース検索を高速化するために作成するインデックスの種別を指定します。ここだと、objectClassのインデックスを指定しています。 | | :index|データベース検索を高速化するために作成するインデックスの種別を指定します。ここだと、objectClassのインデックスを指定しています。 |
| | :TLSXXX|SSLトランスポート用のサーバ証明書/秘密鍵を指定します。 | | :TLSXXX|SSLトランスポート用のサーバ証明書/秘密鍵を指定します。 |
| | + | |
| | **ldap.conf [#u5c010f4] | | **ldap.conf [#u5c010f4] |
| | 続いて、/etc/openldap/ldap.confを設定します。LDAPクライアントツール用の設定です。 | | 続いて、/etc/openldap/ldap.confを設定します。LDAPクライアントツール用の設定です。 |
| | # LDAP Defaults | | # LDAP Defaults |
| | # | | # |
| | + | |
| | # See ldap.conf(5) for details | | # See ldap.conf(5) for details |
| | # This file should be world readable but not world writable. | | # This file should be world readable but not world writable. |
| | + | |
| | BASE dc=example,dc=com | | BASE dc=example,dc=com |
| | URI ldap://foo.example.com | | URI ldap://foo.example.com |
| | + | |
| | TLS_CACERT /etc/openldap/ssl/ldap.pem | | TLS_CACERT /etc/openldap/ssl/ldap.pem |
| | TLS_REQCERT allow | | TLS_REQCERT allow |
| | | | |
| | そして/tmp配下に吐き出したldifファイルを以下のコマンドでLDAPサーバにインポートします。 | | そして/tmp配下に吐き出したldifファイルを以下のコマンドでLDAPサーバにインポートします。 |
| - | # ldapadd -D "cn=Manager,dc=example,dc=com" -W -f <template_file> | + | # ldapadd -x -D "cn=Manager,dc=example,dc=com" -W -f <template_file> |
| | きちんとインポートされたかどうかは、以下のコマンドで確認できます。 | | きちんとインポートされたかどうかは、以下のコマンドで確認できます。 |
| - | # ldapsearch -D "cn=Manager,dc=example,dc=com" -W | + | # ldapsearch -x -D "cn=Manager,dc=example,dc=com" -W |
| | これでサーバの準備ができました♪ | | これでサーバの準備ができました♪ |