I have a linux machine setup to authenticate users using Active Directory with samba/winbind.
Apache is then setup to use that to authenticate the users. This is done using:
<IfModule mod_authnz_external.c> AddExternalAuth pwauth /usr/sbin/pwauth SetExternalAuthMethod pwauth pipe </IfModule>
But page requests taking less than 1 second without auth now takes > 6 seconds. Looking at the log in
/var/log/samba/log.winbindd does not show any errors but each page load seem to require a lot of of authentication requests. Basically there seem to be one authentication per resource loaded, for example for each css file.
/etc/samba/smb.conf I have tried to play with some settings such as
winbind cache time = 300 and
winbind offline logon = yes. I also tried to change the idmap backend from tdb to ad.
During the page load the cpu usage of winbindd gets very high, ~50-60% while no other process seem to go over 10-20%.
Have I misssed some config that could speed this up, or are there better approaches to this problem (like using something other than mod_authnz_external)?