Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to configure a squid with squidguard and MS AD. I've successfuly linked my squid with my AD so far, but now, I want to link my squidguard with the active directory.

I've followed multiple tutorial, but i'm stuck with the same problem : when I launch squid, I have

2013-09-11 16:45:21 [6519] New setting: dbhome: /var/lib/squidguard/db
2013-09-11 16:45:21 [6519] New setting: logdir: /var/log/squid
2013-09-11 16:45:21 [6519] syntax error in configfile /etc/squid3/squidGuard.conf line 4
2013-09-11 16:45:21 [6519] Going into emergency mode

This is the error I get with the squidGuard 1.4 that I compiled with the --with-ldap=yes option.

Here's my squidGuard.conf file :

ldapbinddn CN="Acces AD",OU=Utilisateurs,DC=company,DC=local
ldapbindpass mypassword
ldapcachetime 60

src admin {
 ldapusersearch ldap://,dc=local?sAMAccountName?sub?(&(memberof=CN=mygroup%2cOU=Users%2cDC=company%2cDC=local)(sAMAccountName=%s))

It seems that my squidGuard build is not compiled with LDAP support, but I did specified the option when I ran the compile script. I searched pretty much everything I could think of in google, but it did not solve my problem, so I was hoping that I may find some enlightenment here.


I installed the debian squidGuard package, and I have some new things in my squidGuard.log :

2013-09-11 17:44:07 [7003] New setting: ldapcachetime: 60
2013-09-11 17:44:07 [7003] syntax error in configfile /etc/squid3/squidGuard.conf line 9
2013-09-11 17:44:07 [7003] Going into emergency mode
2013-09-11 17:44:07 [7004] New setting: dbhome: /var/lib/squidguard/db
2013-09-11 17:44:07 [7004] New setting: logdir: /var/log/squid
2013-09-11 17:44:07 [7004] New setting: ldapbinddn: CN="Acces AD",OU=Utilisateurs,DC=company,DC=local
2013-09-11 17:44:07 [7004] New setting: ldapbindpass: mypassword
2013-09-11 17:44:07 [7004] New setting: ldapcachetime: 60
2013-09-11 17:44:07 [7004] syntax error in configfile /etc/squid3/squidGuard.conf line 9
2013-09-11 17:44:07 [7004] Going into emergency mode
share|improve this question

Change ldapbinddn CN="Acces AD",OU=Utilisateurs,DC=company,DC=local to

ldapbinddn "CN=Acces AD,OU=Utilisateurs,DC=company,DC=local"
share|improve this answer
I changed the line to match yours, but I still have the same error. The line 9 in my config file matches the ldapusersearch ldap://,dc=local?sAMAccountName?sub?(&(memberof=CN=my‌​group%2cOU=Users%2cDC=company%2cDC=local)(sAMAccountName=%s)) line. Maybe it is malformed ? Is there any way to make squidGuard more verbose ? – valentin Sep 13 '13 at 7:24
@valentin, you just specify the bind DN as is, no need to add any quotes. – strongline Dec 30 '15 at 16:09

Not sure if this helps, but generally when i'm using squidGuard, I found that having it search LDAP was relatively slow, and it can already use the authenticated user name directly from Squid itself, I basically just have a text file with the list of users that need special privileges.


src userGroup1{
    userlist /etc/squid/userGroup1.txt
    userGroup1 {
       pass good whitelist graylist !bad !malware any
    default {
       pass good whitelist !bad !malware any
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.