ADSERVER=dc.company.ru
DOMAIN=company.ru
WORKGROUP=COMPANY
USER=lexit
yum -y install ntp
sed -i "s/^server /#server /g" /etc/ntp.conf
echo "server $ADSERVER" >> /etc/ntp.conf
ntpdate $ADSERVER
service ntpd start
yum update
yum install mc vim httpd php svn httpd-devel make autoconf gcc ntp krb5-workstation \
samba-common authconfig samba-winbind
chkconfig ntpd on
authconfig --enableshadow --enablemd5 --passalgo=md5 --krb5kdc=$ADSERVER \
--krb5realm=$DOMAIN --smbservers=$ADSERVER --smbworkgroup=$WORKGROUP \
--enablewinbind --enablewinbindauth --smbsecurity=ads --smbrealm=$DOMAIN \
--smbidmapuid="16777216-33554431" --smbidmapgid="16777216-33554431" --winbindseparator="+" \
--winbindtemplateshell="/bin/false" --enablewinbindusedefaultdomain --disablewinbindoffline \
--winbindjoin=$USER --disablewins --disablecache --enablelocauthorize --updateall
service winbind start
chkconfig winbind on
setsebool -P allow_httpd_mod_auth_ntlm_winbind on
wbinfo -u
wbinfo -g
usermod -G wbpriv apache
svn co svn://svnanon.samba.org/lorikeet/trunk/mod_auth_ntlm_winbind mod_auth_ntlm_winbind
cd mod_auth_ntlm_winbind/
autoconf
./configure
apxs -DAPACHE2 -c -i mod_auth_ntlm_winbind.c
--------------------------
/etc/apache2/httpd.conf
--------------------------
..........
keepalive On
..........
LoadModule auth_ntlm_winbind_module /usr/lib64/httpd/modules/mod_auth_ntlm_winbind.so
<Directory "/var/www/html">
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "NTLM Authentication"
AuthType NTLM
Require valid-user
NTLMAuth on
NTLMAuthHelper "/usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp"
NTLMBasicAuthoritative on
</Directory>