[centos-users 1423] Re: mod_authz_ldap を利用した、Apache + ActiveDirectory の Basic 認証時に SEGV が発生
睦月
mutsuki @ mf.point.ne.jp
2010年 8月 4日 (水) 17:21:51 JST
睦月です。
その後、全て上手くいきましたので、あまり需要は無いかもしれませんが、設定
を残しておこうかと思います。
<環境>
CentOS-5.5
httpd(rpm)
mod_authz_ldap(rpm)
Windows 2003 Server R2 Standard
<mod_authz_ldap 設定>
# cat /etc/httpd/conf.d/authz_ldap.conf
LoadModule authz_ldap_module modules/mod_authz_ldap.so
<IfModule mod_authz_ldap.c>
<Location /~user1>
AuthType basic
AuthName "AD LDAP Test"
AuthzLDAPServer "ad.example.local"
AuthzLDAPMethod ldap
AuthzLDAPBindDN "cn=ldap-test,dc=ad,dc=example,dc=local"
AuthzLDAPBindPassword "Password"
AuthzLDAPMapMethod ad
AuthzLDAPUserKey sAMAccountName
AuthzLDAPUserBase "ou=SysOU,dc=ad,dc=example,dc=local"
AuthzLDAPUserScope subtree
AuthzLDAPAuthoritative off
Require valid-user
</Location>
</IfModule>
以下は ActiveDirectory との接続に SSL (LDAPS) を利用したい場合のみ。
mod_authz_ldap は ldaps に対応していないため、stunnel を client mode で
利用します。
<stunnel + xinetd の設定>
# cat /etc/stunnel/ad-ldaps.conf
chroot = /var/run/stunnel/
setuid = nobody
setgid = nobody
pid = /ad-ldaps.pid
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
connect = ad.example.local:636
client = yes
# cat /etc/services | grep ad-ldaps
ad-ldaps 10636/tcp
# cat /etc/xinetd.d/ad-ldaps
service ad-ldaps
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/stunnel
server_args = /etc/stunnel/ad-ldaps.conf
}
<mod_authz_ldap の設定(差違のみ)>
AuthzLDAPServer "ad.example.local"
↓
AuthzLDAPServer "localhost:10636"
以上、これで無事に Apache + ActiveDirectory を LDAPS にて運用することが
できました。お目汚し失礼いたしました。
--
睦月
centos-users メーリングリストの案内