Gnome Home Mon compte Rechercher Forum Downloads FAQ Howto Pas encore enregistré? Devenez membre ici. (L'enregistrement est gratuit). 10/09/2010 - 14:35

Howto Squid authentification
Dernière mise à jour : 2006-04-28 16:33:36 (11738 lectures)
[Imprimer la page | Envoyé à un ami]

Howto Squid authentification BETA

Author: MasterSleepy
Contributor: 
Release: SME Server 7.x
License: GPL
Thanks: Great thanks to dungog.net, this work is based on dansguardian contrib


Problem: You want your users to loggin to go to internet
Solution: Follow this Howto


STEP 1: Create custom template directory

[root@server root]# mkdir -p /etc/e-smith/templates-custom/etc/squid/squid.conf
[root@server root]# cd /etc/e-smith/templates-custom/etc/squid/squid.conf

STEP 2:  Create Template

Edit 15AuthProgramNCSA with your favorite text editor

{
return "" unless ( ($squid{RequireAuth} || "no") eq "ncsa");

$OUT .= "
auth_param basic program /usr/lib/squid/ncsa_auth /etc/proxyusers
auth_param basic children 5
auth_param basic realm squid proxy server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
";}

Edit 15AuthProgramPamAuth with your favorite text editor

{
return "" unless ( ($squid{RequireAuth} || "no") eq "pam");

$OUT .= "
auth_param basic program /usr/lib/squid/pam_auth
auth_param basic children 5
auth_param basic realm squid proxy server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
";}

Edit 20ACL05ProxyAuth with your favorite text editor

{
return "acl requireauth proxy_auth REQUIRED"
if (defined $squid{RequireAuth} && $squid{RequireAuth} =~ /(ncsa|pam)/);
}

Edit 39http_access00pwdprotect with your favorite text editor

{
return "http_access allow requireauth"
if (defined $squid{RequireAuth} && $squid{RequireAuth} =~ /(ncsa|pam)/);
}

STEP 3:  If you want to use PAM authentification

[root@server root]# db configuration setprop squid RequireAuth pam
[root@server root]# expand-template /etc/squid/squid.conf
[root@server root]# service squid restart

STEP 3:  If you want to use NCSA authentification

[root@server root]# db configuration setprop squid RequireAuth ncsa
[root@server root]# expand-template /etc/squid/squid.conf
[root@server root]# service squid restart

Create user authentification file

[root@server root]# touch /etc/proxyusers
[root@server root]# htpasswd -b /etc/proxyusers [name] [password]

Adapt [name] and [password] for your need, you can add as many user as you want

You can test it with the following command

[root@server root]# /usr/lib/squid/ncsa_auth /etc/proxyusers

At the prompt type
[name] [passzord]
you should have response ERR or OK


[Premier]  [Précédent]  [Retour à l'article principal]  [Suivant]  [Dernier]
[Imprimer la page | Envoyé à un ami]
Languages
minimizeclose
Langue préférée :

English Français
bottom_left bottom_right
Site
minimizeclose
bottom_left bottom_right
Staff Status
minimizeclose
Bienvenue visiteur

L'enregistrement est complètement gratuit et vous permettra d'avoir accès à toutes les parties du site
Enregistrement ici

Pseudo:


Mot de passe:


Se souvenir de moi

Membres:  Membres:
Dernier:  Nouveau aujourd'hui: 5
Dernier:  Nouveau hier: 6
Dernier:  Total: 759
Dernier:  Dernier:
inipseddy
Membres:  Connecté
Membres:  Membres: 0
Visiteurs:  Visiteurs: 3
Total:  Total: 3
Membres:  Membres en ligne
Aucun membre de connecté
bottom_left bottom_right
Vus il y a peu...
minimizeclose
arrow MasterSleepy

13:08:28 - 10.09.2010

arrow cedric

0:40:39 - 10.09.2010

arrow papangue

8:23:52 - 08.09.2010

arrow feeny

7:32:15 - 04.09.2010

arrow steveharvey27

7:48:00 - 31.08.2010

arrow Carpate

23:02:19 - 30.08.2010

arrow dfalt

7:49:50 - 30.08.2010

arrow immind

18:06:21 - 26.08.2010

arrow romu69

13:20:28 - 24.08.2010

arrow alarch

22:31:23 - 23.08.2010

bottom_left bottom_right
Translate
minimizeclose
google

bottom_left bottom_right
Liens
minimizeclose
bottom_left bottom_right
Visiteurs
minimizeclose
Total : 1140974
Aujourd'hui : 243
Connecté : 11
bottom_left bottom_right
Citations
minimizeclose

Il n'y a pas de bonheur parfait! dir l'homme quand sa belle-mèr mourut et qu'on lui présenta la note des pompes funèbre.
Jérôme K. Jérôme

bottom_left bottom_right
goes to top
Page created in 0,20477509498596 seconds.