LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-24-2012, 01:34 PM   #1
bachawiss
Member
 
Registered: May 2012
Posts: 34

Rep: Reputation: Disabled
squid.conf problem


Hi i am using squid 2.7 stable9 and i would an ldap authentication to my users
squid works well with ldap


Quote:
# /usr/lib/squid/ldap_auth -b "ou=groups,dc=example,dc=com" -f "uid=%s" -h 127.0.0.1 -d -v 3
user1 user1
user filter 'uid=user1', searchbase 'ou=groups,dc=example,dc=com'
attempting to authenticate user 'cn=user1,ou=groups,dc=example,dc=com'
OK
i would now configure the squid.conf file to use authentification
but when i restart squid,it still waiting,and wouldn't start
and this is the content of squid.conf file
Quote:
/usr/lib/squid/ldap_auth -b "ou=groups,dc=example,dc=com" -f "uid=%s" -h 127.0.0.1 -d -v 3

auth_param basic children 5
auth_param basic realm Web-Proxy
auth_param basic credentialsttl 1 minute

acl ldap-auth proxy_auth REQUIRED

http_access allow ldap-auth
http_access allow localhost
http_access deny all
thanks to help to resolv this problem
 
Old 05-24-2012, 04:09 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
/usr/lib/squid/ldap_auth -b "ou=groups,dc=example,dc=com" -f "uid=%s" -h 127.0.0.1 -d -v 3

auth_param basic children 5
auth_param basic realm Web-Proxy
auth_param basic credentialsttl 1 minute

acl ldap-auth proxy_auth REQUIRED

http_access allow ldap-auth
http_access allow localhost
http_access deny all
The line in bold is wrong. You need a "auth_param basic program" before of it, to define the helper application used.
See the example here


Regards
 
Old 05-24-2012, 04:28 PM   #3
bachawiss
Member
 
Registered: May 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
i am sorry but always the same problem

# /etc/init.d/squid start
squid stop/waiting
 
Old 05-24-2012, 05:24 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by bachawiss View Post
i am sorry but always the same problem

# /etc/init.d/squid start
squid stop/waiting
Have a look at the logs (/var/log/messages, /var/log/syslog, squid logs) to see if you find anything.
Or you can start squid from CLI in debug mode and watch the output:
Code:
/usr/sbin/squid -X -N
(Change the path to the squid executable accordingly)

Regards
 
Old 05-24-2012, 07:07 PM   #5
bachawiss
Member
 
Registered: May 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
Code:
/usr/sbin/squid -X -N
i found anything in log files (squid logs)because it s not working
this is the result of the debug
Attached Files
File Type: txt Nouveau document texte.txt (13.2 KB, 58 views)

Last edited by bachawiss; 05-24-2012 at 07:10 PM.
 
Old 05-25-2012, 12:31 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
The last lines from the file you've attached:
Quote:
<snip>
2012/05/25 01:03:23| aclParseAclList: looking for ACL name 'localhost'
2012/05/25 01:03:23| ACL name 'localhost' not defined!
2012/05/25 01:03:23| leave_suid: PID 10097 called
2012/05/25 01:03:23| leave_suid: PID 10097 giving up root, becoming 'proxy'
FATAL: Bungled squid.conf line 10: http_access allow localhost
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
So check squid.conf, if you have defined an ACL named localhost
 
Old 05-25-2012, 03:50 AM   #7
bachawiss
Member
 
Registered: May 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
The last lines from the file you've attached:

So check squid.conf, if you have defined an ACL named localhost
this acl is available O.o

acl localhost src 127.0.0.1/32

the problem is in the lines writen in 1st post
when i commnet them,it works

Last edited by bachawiss; 05-25-2012 at 03:52 AM.
 
Old 05-25-2012, 04:25 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
the problem is in the lines writen in 1st post
when i commnet them,it works
Then did you change them as advised in my 1st reply? You should have:
Code:
auth_param basic program /usr/lib/squid/ldap_auth -b "ou=groups,dc=example,dc=com" -f "uid=%s" -h 127.0.0.1 -d -v 3

auth_param basic children 5
auth_param basic realm Web-Proxy
auth_param basic credentialsttl 1 minute

acl ldap-auth proxy_auth REQUIRED
 
Old 05-25-2012, 05:08 AM   #9
bachawiss
Member
 
Registered: May 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Then did you change them as advised in my 1st reply? You should have:
Code:
auth_param basic program /usr/lib/squid/ldap_auth -b "ou=groups,dc=example,dc=com" -f "uid=%s" -h 127.0.0.1 -d -v 3

auth_param basic children 5
auth_param basic realm Web-Proxy
auth_param basic credentialsttl 1 minute

acl ldap-auth proxy_auth REQUIRED
Yes of course
 
Old 05-25-2012, 06:04 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
OK, post squid.conf to see if we can spot the error
 
Old 05-25-2012, 06:24 AM   #11
bachawiss
Member
 
Registered: May 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
OK, post squid.conf to see if we can spot the error
)
Attached Files
File Type: txt squid.conf.txt (171.0 KB, 116 views)
 
Old 05-25-2012, 07:13 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Wow, you could trim down comments at least!!
Anyway, put all your ACLs at the beginning, or in anyway before using them with http_access directives

Regards
 
Old 05-25-2012, 08:08 AM   #13
bachawiss
Member
 
Registered: May 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Wow, you could trim down comments at least!!
Anyway, put all your ACLs at the beginning, or in anyway before using them with http_access directives

Regards
)
Attached Files
File Type: txt squid.conf.txt (1.9 KB, 75 views)
 
Old 05-25-2012, 08:40 AM   #14
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Better stop smilies and write something useful, if you really need help.
Try the following and let us know how it goes
Code:
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT

#this is the lines that i add for the ldap authentication :
auth_param basic program /usr/lib/squid/ldap_auth -b "ou=groups,dc=example,dc=com" -f "uid=%s" -h 127.0.0.1 -d -v 3

auth_param basic children 5
auth_param basic realm Web-Proxy
auth_param basic credentialsttl 1 minute

acl ldap-auth proxy_auth REQUIRED

http_access allow ldap-auth
http_access allow localhost
http_access deny all

##### The rest as is #####
http_port 3128 transparent
access_log /var/log/squid/access.log squid
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
acl apache rep_header Server ^Apache
acl yahoo dstdomain fr.yahoo.com
http_access deny yahoo
http_access allow all
broken_vary_encoding allow apache
extension_methods REPORT MERGE MKACTIVITY CHECKOUT
hosts_file /etc/hosts
coredump_dir /var/spool/squid
url_rewrite_program /usr/local/bin/squidGuard -c /usr/local/squidGuard/squidGuard.conf
url_rewrite_children 5
 
Old 05-25-2012, 10:10 AM   #15
bachawiss
Member
 
Registered: May 2012
Posts: 34

Original Poster
Rep: Reputation: Disabled
thanks it works pefectly
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
squid conf: squid failed when I type insert redirect_program /usr/bin/squidguard laxmantsharma Linux - Software 1 02-24-2009 06:02 AM
Once again squid.conf problem hassandit Linux - Server 5 02-19-2009 01:14 AM
problem squid.conf albeniz General 0 10-18-2007 12:27 PM
need examples of squid.conf & dansguardian.conf jocast Linux - Software 1 05-11-2006 04:47 PM
squid conf: squid failed when I type insert redirect_program /usr/bin/squidguard Niceman2005 Linux - Software 1 11-24-2004 02:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration