大网数据广告活动
服务器运维问答

winbind authentication through apache slow

· 52CE 我爱测

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…

问题原文

原帖链接 · Zitrax · CC BY-SA 3.0

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.

In /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)?

已采纳解答

原帖链接 · Zitrax · CC BY-SA 3.0

I still didn't find how to improve the performance when using mod_authnz_external. However changing to another apache module mod_authnz_ldap got rid of the performance problem. The only downside then is that the ldap configuration is duplicated for the system and for apache.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-09-01)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。