FreeBSD-5でNSS(というかLDAP?)
用意するもの
- FreeBSD(5-current)
- openldap(net/openldap)
- pam_ldap(security/pam_ldap)
- nss_ldap(net/nss_ldap)
/etc/nsswitch.confの編集
passwd: compat
passwd_compat: ldap
group: compat
group_compat: ldap
/etc/passwd, /etc/groupに LDAP用のエントリ追加
NISを参考に以下のように追加
+:::::::::
+:*::
openldapの設定
サーバ編
- /usr/local/etc/openldap/slapd.conf をごにょごにょ
- デフォルトだとIPv6のみにlistenするっぽい、とりあえず明示的にIPv4指定
- slapd起動
クライアント編
- /usr/local/etc/ldap.conf ? /etc/ldap.conf
どっちも(か?)使ってるっぽいので、リンクはっとく
- openldapのコマンドは /usr/local/etc/openldap/ldap.conf を参照している
- sshdのPAMの設定だと、/usr/local/etc/ldap.confをみている
nss_ldap、pam_ldap、openldap それぞれで見ている設定ファイル(ldap.conf)違う感じ
- pam_ldapは /etc/ldap.confを参照 (accoufig.hにかいてある)
- nssは/etc/ldap.confで、PAMは /usr/local/etc/ldap.conf
トップページへ戻る
はちまんこうじ/hachiman@ofug.net