Toon posts:

[Squid] authentication lukt niet

Pagina: 1
Acties:

Verwijderd

Topicstarter
Onder RedHat 9 heb ik Squid 2.5STABLE geinstalleerd.

Alles werkt nabehoren alleen en nu wil ik dat er user authentication op komt.
Dit wil graag via PAM regelen. Nu heb ik de squid.conf bepaald waar PAM te vinden is, maar ik krijg na het herstarten van squid deze fout.

parseConfigFile: line 1005 unrecognized: 'authenticate_program /usr/lib/squid/pam_auth'

Wat doe ik nou fout?

[ Voor 3% gewijzigd door Verwijderd op 07-10-2003 13:40 ]


Verwijderd

Misschien is het een goed idee je squid.conf te posten? (of iig die line 105)

Verwijderd

Topicstarter
Line 1005 is

authenticate_program /usr/lib/squid/pam_auth

  • pistole
  • Registratie: Juli 2000
  • Laatst online: 15:22

pistole

Frutter

uhm
authenticate_program /usr/lib/squid/pam_auth
werkt gewoon bij mij (squid-2.5.STABLE1-2). Heb je niet een type in de regel ervoor of de regel erna?

Ik frut, dus ik epibreer


  • Wilke
  • Registratie: December 2000
  • Laatst online: 23:04
Squid documentatie over authenticate_program

De regel is niet compleet, je moet ook een passwd-file opgeven blijkbaar?

Zoek inderdaad eerst een wat beter in die configfile, er zal echt wel ergens een typo inzitten ofzo.

[ Voor 25% gewijzigd door Wilke op 07-10-2003 13:59 ]


Verwijderd

Topicstarter
pistole schreef op 07 oktober 2003 @ 13:56:
uhm
authenticate_program /usr/lib/squid/pam_auth
werkt gewoon bij mij (squid-2.5.STABLE1-2). Heb je niet een type in de regel ervoor of de regel erna?
Pistole? Zou je het erg vinden om jou squid.conf te mailen? Ik weet echt niet wat ik fout heb.

[ Voor 3% gewijzigd door Verwijderd op 21-06-2004 21:45 ]


Verwijderd

Topicstarter
Wilke schreef op 07 October 2003 @ 13:58:
Squid documentatie over authenticate_program

De regel is niet compleet, je moet ook een passwd-file opgeven blijkbaar?

Zoek inderdaad eerst een wat beter in die configfile, er zal echt wel ergens een typo inzitten ofzo.
Ja klopt, maar dat is voor NCSA_auth. Pam werkt anders denk ik.

  • pistole
  • Registratie: Juli 2000
  • Laatst online: 15:22

pistole

Frutter

Verwijderd schreef op 07 October 2003 @ 14:05:
[...]


Pistole? Zou je het erg vinden om jou squid.conf te mailen? Ik weet echt niet wat ik fout heb.

richzzz@multiweb.nl
Ja, dat vind ik erg want het is belangrijker dat je evt. problemen zelf oplost. Hier is de desbetreffende regel:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#  TAG: authenticate_program
#   Specify the command for the external authenticator.  Such a
#   program reads a line containing "username password" and replies
#   "OK" or "ERR" in an endless loop.  If you use an authenticator,
#   make sure you have 1 acl of type proxy_auth.  By default, the
#   authenticator_program is not used.
#
#   If you want to use the traditional proxy authentication,
#   jump over to the ../auth_modules/NCSA directory and
#   type:
#       % make
#       % make install
#
#   Then, set this line to something like
#
#   authenticate_program /usr/bin/ncsa_auth /usr/etc/passwd
authenticate_program /usr/lib/squid/pam_auth
#
#Default:
# none

edit:
ik gebruik zelf overigens squid noch pam-authenticatie. Het is dus niet getest, maar squid start met regel erin zonder foutmeldingen.
Heb je overigens /usr/lib/squid/pam_auth wel?

[ Voor 12% gewijzigd door pistole op 07-10-2003 14:14 ]

Ik frut, dus ik epibreer


Verwijderd

Topicstarter
mijn config: exact dezelfde regel zit erin

hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
log_fqdn off
authenticate_program /usr/lib/squid/pam_auth
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl password proxy_auth REQUIRED
acl ourlan src 192.168.10.0/255.255.255.0
http_access deny !ourlan
http_access allow password
http_access deny all
http_reply_access allow all
icp_access allow all
visible_hostname Squidserver


pam_auth is aanwezig. Zie figuur

Afbeeldingslocatie: http://home.quicknet.nl/mw/prive/richzzz/squid.jpg

  • pistole
  • Registratie: Juli 2000
  • Laatst online: 15:22

pistole

Frutter

Verwijderd schreef op 07 October 2003 @ 14:21:
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
Zou die eerste ? ook moeten worden ge-escaped? Ik gok maar wat hoor...

Ik frut, dus ik epibreer


Verwijderd

Topicstarter
Failed to reconfigure squid :

2003/10/07 07:52:36| parseConfigFile: line 1 unrecognized: 'authenticate_program /usr/lib/squid/pam_auth'
2003/10/07 07:52:36| aclParseAclLine: IGNORING: Proxy Auth ACL 'acl password proxy_auth REQUIRED' because no authentication schemes are fully configured.
2003/10/07 07:52:36| aclParseAclLine: IGNORING invalid ACL: acl password proxy_auth REQUIRED
2003/10/07 07:52:36| squid.conf line 9: http_access allow password
2003/10/07 07:52:36| aclParseAccessLine: ACL name 'password' not found.
2003/10/07 07:52:36| squid.conf line 9: http_access allow password
2003/10/07 07:52:36| aclParseAccessLine: Access line contains no ACL's, skipping

:? echt maf gewoon

Verwijderd

Topicstarter
Ja, eindelijk ik heb het voor elkaar, maar wat een gepruts zeg!

Het commando 'authenticate_program' wordt dus helemaal niet gebruikt in de versie die ik heb, maar dat staat wel overal in de HOWTO's!

Ik heb de proxy nu zo geconfigureerd dat alle porno direct geweigerd wordt en dat bepaalde downloads d.m.v. het opgeven van een gebruikersnaam en wachtwoord kan worden opgehaald.

Voor Squid versie 2.5STABLE1 werkt de volgende config met pam.

auth_param basic program /usr/lib/squid/pam_auth
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours

acl all src 0.0.0.0/0.0.0.0
acl lokaal src 192.168.10.0/255.255.255.0
acl porn1 url_regex "/etc/squid/porn1"
acl extensie url_regex "/etc/squid/extensie"
acl validusers proxy_auth REQUIRED

http_access deny porn1
http_access allow extensie validusers
http_access deny extensie
http_access allow lokaal
http_access deny all
http_port 80
visible_hostname squidserver

Hierna dien je nog een bestand aan te maken in /etc/pam.d/ genaamd squid met de volgende inhoud:

auth required /lib/security/pam_unix.so
account required /lib/security/pam_unix.so

Nu kun je gewoon je root login gebruiken...
Pagina: 1