Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 08/01/2009, à 12:14

Kalyuodo

ERR. 407 APT serveur Ubuntu avec auth ProxySquid

Tout d'abord bonjour à tous et bonne année,

Bien que le sujet ait été traité un nombre uncalculable de fois ... je me permet de faire appel à vous. Car même après avoir été consulter les topics suivant :

http://forum.ubuntu-fr.org/viewtopic.ph … 3#p1964633

http://forum.ubuntu-fr.org/viewtopic.php?id=221300

http://forum.ubuntu-fr.org/viewtopic.php?id=250621

http://forum.ubuntu-fr.org/viewtopic.php?id=133116

le problème persiste.

Pour commencer , la distrib est une ubuntu810-server donc sans interface graphique, donc sans synaptique. Le serveur proxy est du type proxy squid et j'y ai accès.

Présentation du problème : En lançant la commande apt-get update (ou plutot aptitude update) voici le problème que je rencontre.

En tentant de lancer :

root@ubuntu-810-server:/etc#apt-get update
Ign http://security.ubuntu.com intrepid-security Release.gpg
Ign http://archive.ubuntu.com intrepid Release.gpg
Ign http://security.ubuntu.com intrepid-security/main Translation-fr
Ign http://security.ubuntu.com intrepid-security/restricted Translation-fr
Ign http://archive.ubuntu.com intrepid/main Translation-fr
Ign http://security.ubuntu.com intrepid-security/universe Translation-fr
Ign http://archive.ubuntu.com intrepid/restricted Translation-fr
Ign http://security.ubuntu.com intrepid-security/multiverse Translation-fr
Ign http://archive.ubuntu.com intrepid/universe Translation-fr
Ign http://security.ubuntu.com intrepid-security Release
Ign http://archive.ubuntu.com intrepid/multiverse Translation-fr
Ign http://security.ubuntu.com intrepid-security/main Packages
Ign http://archive.ubuntu.com intrepid-updates Release.gpg
Ign http://security.ubuntu.com intrepid-security/restricted Packages
Ign http://archive.ubuntu.com intrepid-updates/main Translation-fr
Ign http://security.ubuntu.com intrepid-security/main Sources
Ign http://archive.ubuntu.com intrepid-updates/restricted Translation-fr
Ign http://security.ubuntu.com intrepid-security/restricted Sources
Ign http://archive.ubuntu.com intrepid-updates/universe Translation-fr
Ign http://security.ubuntu.com intrepid-security/universe Packages
Ign http://archive.ubuntu.com intrepid-updates/multiverse Translation-fr
Ign http://security.ubuntu.com intrepid-security/universe Sources
Ign http://archive.ubuntu.com intrepid Release
Ign http://security.ubuntu.com intrepid-security/multiverse Packages
Ign http://archive.ubuntu.com intrepid-updates Release
Ign http://security.ubuntu.com intrepid-security/multiverse Sources
Ign http://archive.ubuntu.com intrepid/main Packages
Err http://security.ubuntu.com intrepid-security/main Packages
  407 Proxy Authentication Required
Ign http://archive.ubuntu.com intrepid/restricted Packages
Err http://security.ubuntu.com intrepid-security/restricted Packages
  407 Proxy Authentication Required
Ign http://archive.ubuntu.com intrepid/main Sources
Err http://security.ubuntu.com intrepid-security/main Sources
  407 Proxy Authentication Required
Ign http://archive.ubuntu.com intrepid/restricted Sources
Err http://security.ubuntu.com intrepid-security/restricted Sources
  407 Proxy Authentication Required
Ign http://archive.ubuntu.com intrepid/universe Packages
Err http://security.ubuntu.com intrepid-security/universe Packages
  407 Proxy Authentication Required
Ign http://archive.ubuntu.com intrepid/universe Sources
Err http://security.ubuntu.com intrepid-security/universe Sources
  407 Proxy Authentication Required
Ign http://archive.ubuntu.com intrepid/multiverse Packages
Err http://security.ubuntu.com intrepid-security/multiverse Packages
  407 Proxy Authentication Required
Ign http://archive.ubuntu.com intrepid/multiverse Sources
Err http://security.ubuntu.com intrepid-security/multiverse Sources
  407 Proxy Authentication Required
Ign http://archive.ubuntu.com intrepid-updates/main Packages
Ign http://archive.ubuntu.com intrepid-updates/restricted Packages
Ign http://archive.ubuntu.com intrepid-updates/main Sources
Ign http://archive.ubuntu.com intrepid-updates/restricted Sources
Ign http://archive.ubuntu.com intrepid-updates/universe Packages
Ign http://archive.ubuntu.com intrepid-updates/universe Sources
Ign http://archive.ubuntu.com intrepid-updates/multiverse Packages
Ign http://archive.ubuntu.com intrepid-updates/multiverse Sources
Err http://archive.ubuntu.com intrepid/main Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com intrepid/restricted Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com intrepid/main Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com intrepid/restricted Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com intrepid/universe Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com intrepid/universe Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com intrepid/multiverse Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com intrepid/multiverse Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com intrepid-updates/main Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com intrepid-updates/restricted Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com intrepid-updates/main Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com intrepid-updates/restricted Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com intrepid-updates/universe Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com intrepid-updates/universe Sources
  407 Proxy Authentication Required
Err http://archive.ubuntu.com intrepid-updates/multiverse Packages
  407 Proxy Authentication Required
Err http://archive.ubuntu.com intrepid-updates/multiverse Sources
  407 Proxy Authentication Required
Lecture des listes de paquets...

L'erreur 407, si j'ai bien suivis dans les topics signifient que le proxy requiere une authentification avec nom d'utilisateur et mot de passe. il faut donc renseigner certains fichier afin que apt-get et wget puisse se diriger vers le proxy est s'autehntifier correctement.

J'ai donc suivis les conseils fournis par la communauté et renseigné les fichier apt.conf, profile, wgetrc, 70debconf de la maniere suivante :

apt.conf :

Acquire::http::Proxy "http://<user>:<mdp>@<adresse_proxy>:8080";

wgetrc :

# You can set the default proxies for Wget to use for http and ftp.
# They will override the value in the environment.
http_proxy = http://<user>:<mdp>@<adresse_proxy>:8080/
ftp_proxy = http://<user>:<mdp>@<adresse_proxy>:8080/

# If you do not want to use proxy at all, set this to off.
use_proxy = on

profile :

export http_proxy="http://<user>:<mdp>@<adresse_proxy>:8080"
export HTTP_PROXY=$http_proxy
export ftp_proxy=$http_proxy
export FTP_PROXY=$http_proxy

70debconf :

Acquire::http::Proxy "http://<user>:<mdp>@<adresse_proxy>:8080";

Cependant, malgré la saisie de ces informations rien ne semble bouger ... Pas d'amélioration.
De plus, le nom d'utilisateur est un nom d'user AD donc sous la forme DOMAIN\user : ce qui donnerais quelque chose dans ce style la : Acquire::http::Proxy "http://TEST\\toto:tata@ip_proxy:8080";. Ce ne fonctionnant pas j'ai testé les deux manières suivante avec le user : soit user:mdp soit DOMAIN\\user:mdp, sans plus de succès.

Certaines personne parlaient d'utiliser NTLMAPS, mais il semble que ce soit pour les personnes utilisant un proxy ISA. Celà fonctionnerait il si je le l'installais pour faire le relais avec le proxy squid?

Merci par avance

Dernière modification par Kalyuodo (Le 08/01/2009, à 17:54)


Linux user : 483639

Hors ligne

#2 Le 09/01/2009, à 10:57

Kalyuodo

Re : ERR. 407 APT serveur Ubuntu avec auth ProxySquid

Suite du problème :

Suite au problème rencontré je me suis dis que le problème pouvait peut être venir du fichier sources.list, et que l'accès à certains dépôts seraient bloqués autre part pour X ou Y raisons.

Je suis donc parti générer un nouveau fichier sources.list à partir du générateur de fichier sources de Mcpeter : http://sources-list.ubuntu-fr-secours.org/.

J'ai laissé la config par défaut, ce qui ma généré le fichier sources.list suivant :

###############################################################################
##             UBUNTU VERSION INTREPID IBEX - 8.10 - Date : 9/01/2009
##
##
##    SOURCES.LIST GENERATOR Version 0.1b-8.10
##    http://sources-list.ubuntu-fr-secours.org
###############################################################################

## DEPOTS PRINCIPAUX
deb http://fr.archive.ubuntu.com/ubuntu intrepid main restricted 
deb-src http://fr.archive.ubuntu.com/ubuntu intrepid main restricted 

## DEPOTS DE MISES A JOUR DE SECURITE
deb http://fr.archive.ubuntu.com/ubuntu intrepid-security main restricted 
deb-src http://fr.archive.ubuntu.com/ubuntu intrepid-security main restricted 

## DEPOTS DE MISES A JOUR IMPORTANTES
deb http://fr.archive.ubuntu.com/ubuntu intrepid-updates main restricted 
deb-src http://fr.archive.ubuntu.com/ubuntu intrepid-updates main restricted 

###############################################################################

Suite à ca j'ai relancé un apt-get update et voici ce que j'ai récupérer de nouveau :

Ign http://fr.archive.ubuntu.com intrepid Release.gpg
Ign http://fr.archive.ubuntu.com intrepid/main Translation-fr
Ign http://fr.archive.ubuntu.com intrepid/restricted Translation-fr
Ign http://fr.archive.ubuntu.com intrepid-security Release.gpg
Ign http://fr.archive.ubuntu.com intrepid-security/main Translation-fr
Ign http://fr.archive.ubuntu.com intrepid-security/restricted Translation-fr
Ign http://fr.archive.ubuntu.com intrepid-updates Release.gpg
Ign http://fr.archive.ubuntu.com intrepid-updates/main Translation-fr
Ign http://fr.archive.ubuntu.com intrepid-updates/restricted Translation-fr
Ign http://fr.archive.ubuntu.com intrepid Release
Ign http://fr.archive.ubuntu.com intrepid-security Release
Ign http://fr.archive.ubuntu.com intrepid-updates Release
Ign http://fr.archive.ubuntu.com intrepid/main Packages
Ign http://fr.archive.ubuntu.com intrepid/restricted Packages
Ign http://fr.archive.ubuntu.com intrepid/main Sources
Ign http://fr.archive.ubuntu.com intrepid/restricted Sources
Ign http://fr.archive.ubuntu.com intrepid-security/main Packages
Ign http://fr.archive.ubuntu.com intrepid-security/restricted Packages
Ign http://fr.archive.ubuntu.com intrepid-security/main Sources
Ign http://fr.archive.ubuntu.com intrepid-security/restricted Sources
Ign http://fr.archive.ubuntu.com intrepid-updates/main Packages
Ign http://fr.archive.ubuntu.com intrepid-updates/restricted Packages
Ign http://fr.archive.ubuntu.com intrepid-updates/main Sources
Ign http://fr.archive.ubuntu.com intrepid-updates/restricted Sources
Err http://fr.archive.ubuntu.com intrepid/main Packages
  407 Proxy Authentication Required
Err http://fr.archive.ubuntu.com intrepid/restricted Packages
  407 Proxy Authentication Required
Err http://fr.archive.ubuntu.com intrepid/main Sources
  407 Proxy Authentication Required
Err http://fr.archive.ubuntu.com intrepid/restricted Sources
  407 Proxy Authentication Required
Err http://fr.archive.ubuntu.com intrepid-security/main Packages
  407 Proxy Authentication Required
Err http://fr.archive.ubuntu.com intrepid-security/restricted Packages
  407 Proxy Authentication Required
Err http://fr.archive.ubuntu.com intrepid-security/main Sources
  407 Proxy Authentication Required
Err http://fr.archive.ubuntu.com intrepid-security/restricted Sources
  407 Proxy Authentication Required
Err http://fr.archive.ubuntu.com intrepid-updates/main Packages
  407 Proxy Authentication Required
Err http://fr.archive.ubuntu.com intrepid-updates/restricted Packages
  407 Proxy Authentication Required
Err http://fr.archive.ubuntu.com intrepid-updates/main Sources
  407 Proxy Authentication Required
Err http://fr.archive.ubuntu.com intrepid-updates/restricted Sources
  407 Proxy Authentication Required
Lecture des listes de paquets...

C'est un peu mieux mais toujours le meme type d'erreur.
A savoir que lorsque je fais une authentification par adresse IP sur le proxysquid les MAJ se récupérent correctement ...

Pareil j'ai aussi testé avec la commande :

http_proxy="http://<user>:<mdp>@<adresse_proxy>:8080" apt-get update

Mais ca ne change rien.
Pour ceux qui ont peur de me faire faire des manip sur le serveur, il s'agit d'un serveur de test sous VMWARE donc aucun soucis à avoir de ce côté la.


Linux user : 483639

Hors ligne

#3 Le 09/01/2009, à 18:16

mig063

Re : ERR. 407 APT serveur Ubuntu avec auth ProxySquid

Bonjour,

ça peut paraitre bete mais la derniere fois que j'ai fait ça je me suis un peu battu avec la syntaxe du apt.conf

essai avec un / entre ton port et les guillemets fermant et saute une ligne apres la ligne dans apt.conf :

------apt.conf
"http://<user>:<mdp>@<adresse_proxy>:8080/";
newline vide
----------------

je ne suis pas convaincu mais ca coute pas cher a tester.

Hors ligne

#4 Le 22/01/2009, à 15:56

Kalyuodo

Re : ERR. 407 APT serveur Ubuntu avec auth ProxySquid

Bonjour mig063,

Merci pour le petit conseil !! smile

Malheureusement je viens de tester et ca ne fonctionne pas plus sad, par contre lorsque je vais sur le serveur proxy et que je crée une autorisation par adresse IP j'arrive à télécharger les MAJ ...

cela viendrait donc de la syntaxe dans le fichier apt.conf.

La question que je me pose donc est la suivante :
Qu'elle est la syntaxe a respecter lorsque le compte que l'on utilise pour s'authentifier au proxy squid est un compte AD windows.

Si l'on prend l'exemple suivant :
Domaine AD : TEST
utilisateur : Toto

la syntaxe de l'utilisateur est donc bien TEST\Toto non?

ce qui donnerais un truc dans le genre : "http://TEST\Toto:<mdp>@<proxy>:<port>/" non ?
Ou même "http://TEST\\Toto:<mdp>@<proxy>:<port>/".

merci d'avance


Linux user : 483639

Hors ligne