Squid et NTLM impossible de se connecter via le formulaire

Résolu/Fermé
jonathan6868 Messages postés 2 Date d'inscription lundi 10 février 2014 Statut Membre Dernière intervention 12 février 2014 - 10 févr. 2014 à 18:59
zipe31 Messages postés 36402 Date d'inscription dimanche 7 novembre 2010 Statut Contributeur Dernière intervention 27 janvier 2021 - 12 févr. 2014 à 16:05
Debian jessie : 3.12-1-amd64 #1 SMP Debian 3.12.9-1 (2014-02-01) x86_64 GNU/Linux

Version squid : Squid Cache: Version 3.4.3


J'essaye de mettre en place squid avec une authentification via l'AD pour les utilisateurs du domaine "en transparent " et pour les utilisateurs qui ne sont pas dans le domaine une authentification via un formulaire qu'ils devront renseigner avec un compte de l'AD.


Mon problème est le suivant lorsque j'essaye de naviguer avec un user hors AD j'ai bien le formulaire qui s'ouvre dans le navigateur mais peu importe ce que j'entre comme login et mot de pass rien ne passe.


Voici mes différentes conf:

squid.conf



#################################################################
#Authentification basée sur le programme NTLM
#
auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol= squid-2.5-ntlmssp
auth_param ntlm children 50


################################################################
#Authentification pour les utilisateurs dont la station n'est pas
#intégrée au domaine
#

auth_param basic program /usr/bin/ntlm_auth --helper-protocol= squid-2.5-basic
auth_param basic children 50
auth_param basic realm proxy du domaine squidproxy.fr
auth_param basic credentialsttl 2 hours


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 localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443
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 CONNECT method CONNECT
acl auth_ntlm proxy_auth REQUIRED

http_access allow auth_ntlm
http_access allow localnet
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access deny all


http_port 3128


cache_dir ufs /usr/local/squid/var/cache/squid 100 16 256
coredump_dir /usr/local/squid/var/cache/squid

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320



cache_effective_user squid
cache_effective_group squid
visible_hostname DEBIANROUGE@squidproxy.fr
append_domain .squidproxy.fr



krb5.conf



[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log

[libdefaults]
default_realm = SQUIDPROXY.FR
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true

[realms]
SQUIDPROXY.FR = {
kdc = win2008.squidproxy.fr:88
admin_server = win2008.squidproxy.fr:789
default_domain=squidproxy.fr
}

[domain_realm]
.squidproxy.fr = SQUIDPROXY.FR
squidproxy.fr = SQUIDPROXY.FR




nsswitch.conf







passwd: files winbind
group: files winbind
shadow: files

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis





Et voici les droits sur certains repertoires :

ls -l /var/lib/samba/

drwxr-x--- 2 root squid 4096 févr. 10 18:27 winbindd_privileged

et encore :


# chown squid:squid/usr/local/squid/var/cache/squid
# chown squid:squid/usr/local/squid/var/logs/
# chmod -R 700 /usr/local/squid/var/logs/



Toutes ces commandes fonctionnent et j'ai un retour "succes" :

kinit administrateur
klist
net ADS join -U Administrateur
wbinfo -u
/usr/bin/ntlm_auth --username=ldupont --password=password
/usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic



Une idée ??

merci
A voir également:

1 réponse

jonathan6868 Messages postés 2 Date d'inscription lundi 10 février 2014 Statut Membre Dernière intervention 12 février 2014
12 févr. 2014 à 16:02
Il fallait enlever l espace après le =

auth_param basic program /usr/bin/ntlm_auth --helper-protocol= squid-2.5-basic
auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic

et


auth_param basic program /usr/bin/ntlm_auth --helper-protocol= squid-2.5-basic
auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic

Cette config fonctionne!
0
zipe31 Messages postés 36402 Date d'inscription dimanche 7 novembre 2010 Statut Contributeur Dernière intervention 27 janvier 2021 6 407
12 févr. 2014 à 16:05
Salut,

Merci du retour ;-))
0