コンテンツにスキップ

LDAPとSamba まわりの構築

LDAPクライアント

1.インストール

yum instal gcc-c++ openldap-server openldap-clients pam-ldap openldap-devel perl

2.PATHの設定

PATH=$PATH:.

vers_stringを実行するために必要

3.makeする

make 
make check
make install

LDAPを使ってログインを設定

設定が必要なのは以下のファイル

  • /etc/ldap.conf
    • nssldapとpamldap
  • /etc/openldap/ldap.conf
    • ldapクライアント
  • /etc/nsswitch.conf
    • ユーザ情報の参照ファイル(参照先へLDAPを追加)
  • /etc/pam.d/system-auth

LDAPのコンパイルエラー

1.configure: error

BDB/HDB:BerkeleyDB not available ...

yum install db4-devel

2.configure: error

tcp-wrapper: error

yum install tcp_wrapper-devel

SambaのLDAP連携設定

./configure \
--with-acl-support \ #ACLのサポート
--with-ldapsam \ # LDAPの設定
--with-smbmount \ #smbmountコマンドのサポート
--with-syslog \ # syslogへ出力
--with-utmp \ # ログインのログを出す
--with-tdbsam # tdbsamのサポート