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 17/10/2006, à 09:32

chapi

[Résolu] apt-get et proxy avec authentification

Bonjour,

je cherche à utiliser apt-get ou aptitude sur une Ubuntu-server 6.06.1 tout en étant derrière un proxy requérant une authentification.

J'ai un fichier /etc/apt/apt.conf qui contient les lignes suivantes :

APT::Authentication::TrustCDROM "true";
Acquire::http::Proxy "http://prenom.nom:mot_de_passe@ip_proxy:port_proxy/";

J'ai déjà lu les sujets suivants et appliqué la méthode mais sans succés :
http://forum.ubuntu-fr.org/viewtopic.php?id=9691
http://forum.ubuntu-fr.org/viewtopic.php?id=26849
http://forum.ubuntu-fr.org/viewtopic.php?id=32237

Quand je fait un sudo apt-get update j'ai le message "407 Proxy Authentication Required".
Il trouve donc bien le proxy mais semble ne pas prendre en compte l'authentification.

Merci de votre aide.

Dernière modification par chapi (Le 23/10/2006, à 21:49)

Hors ligne

#2 Le 17/10/2006, à 09:57

bapoumba

Re : [Résolu] apt-get et proxy avec authentification

Salut,
tu as essayé avec l'adresse du proxy, et pas son IP ?

edit : c'est un proxy .pac ? Si oui, je n'ai pas réussi à utiliser un .pac de cette manière. Heureusement pour moi, l'ancien proxy est encore fonctionnel.
D'autre part, dans ton sources.list, tes dépôts sont-ils en http ou en ftp ?

Dernière modification par bapoumba (Le 17/10/2006, à 10:03)


| Ubuntu Forums |
J'aime les fraises.

Hors ligne

#3 Le 17/10/2006, à 10:07

chapi

Re : [Résolu] apt-get et proxy avec authentification

merci de ta réponse

j'ai essayé avec l'adresse et j'ai la même erreur (407)
Ce n'est pas un .pac, c'est juste une url à laquelle je n'ajoute le n° de port (si je ne met pas de port ça ne donne une erreur 404 non trouvé)

Les dépots dans mon source.list sont tous en http

Dernière modification par chapi (Le 17/10/2006, à 10:10)

Hors ligne

#4 Le 17/10/2006, à 10:13

chapi

Re : [Résolu] apt-get et proxy avec authentification

Est ce que le problème pourait venir du fait que le nom d'utilisateur que j'utilise pour m'authentifier comporte un point ?
Si ça peut aider le proxy est un squid 2.5, bien que je pense que ça n'ai pas d'influence.

Hors ligne

#5 Le 17/10/2006, à 10:18

bapoumba

Re : [Résolu] apt-get et proxy avec authentification

chapi a écrit :

Est ce que le problème pourait venir du fait que le nom d'utilisateur que j'utilise pour m'authentifier comporte un point ?
Si ça peut aider le proxy est un squid 2.5, bien que je pense que ça n'ai pas d'influence.

Si ton login sur le proxy comporte un point, je ne crois pas que ce soit le problème. J'imagine de plus que ton authentification fonctionne correctement pour firefox par ex (dans > Édition > Préferences) ou d'une manière générale pour les applis GNOME (> Système > Préférences > Proxy) ou KDE (je ne sais pas où).

C'est quoi ta ligne trust CDrom ?
Ouala ...


| Ubuntu Forums |
J'aime les fraises.

Hors ligne

#6 Le 17/10/2006, à 10:25

chapi

Re : [Résolu] apt-get et proxy avec authentification

L'authentification et le proxy en général fonctionnent bien pour les navigateurs.

Petit élément nouveau, quand je tappe l'adresse du proxy dans mon navigateur, il me télécharge un fichier qui ressemble fort à un fichier de configuration automatique (genre .pac). Le problème peut-il venir de là ? Comme tu dis dans un précédent sujet que tu as eu des pb avec un proxy se configurant avec un .pac ...

La ligne APT::Authentication::TrustCDROM "true"; est ajoutée automatique par le programme d'installation de la distrib. Le fichier tel que je le montre dans mon premier message est d'ailleur créé automatiquement, la ligne proxy est configuré d'après ce que je rentre à l'installation.

Dernière modification par chapi (Le 17/10/2006, à 10:33)

Hors ligne

#7 Le 17/10/2006, à 11:06

chapi

Re : [Résolu] apt-get et proxy avec authentification

problème insoluble ?

Hors ligne

#8 Le 17/10/2006, à 11:11

bapoumba

Re : [Résolu] apt-get et proxy avec authentification

Je ne sais pas ... Je prendrai ce soir le temps de regarder plus attentivement. Je suis déjà alée faire un tour sur google, mais rien de probant.
As-tu un proxy sur le port 3128 par ex (c'est un squid dans mon univ aussi) ?


| Ubuntu Forums |
J'aime les fraises.

Hors ligne

#9 Le 17/10/2006, à 11:18

chapi

Re : [Résolu] apt-get et proxy avec authentification

Il n'y a malheureusement qu'un proxy qui semble dur à contourner, c'est un proxy du ministère, il n'est même pas situé dans l'établissement.

Je cherche encore..., un grand merci malgré tout d'avoir essayé de m'aider.

Si quelqu'un d'autre a une idée, qu'il n'hésite pas !

Hors ligne

#10 Le 17/10/2006, à 12:46

NeoFeet

Re : [Résolu] apt-get et proxy avec authentification

J'ai eu un soucis similaire avec une erreur HTTP 407 sur l'authentification donc....
Le proxy par lequel je passe réalise de l'authentication NTML.....

Comme toi, j'avais modifié le fichier apt.conf mais hélas, sans succès !
La seule solution pour m'en sortir fût d'appeler le Helpdesk pourqu'il désactive l'authentification pour cette adresse IP....

A toi donc de savoir quel type d'authentification est faire par le proxy ?
Si c'est du NTLM, ça va être délicat, pour ne pas dire impossible....

Bon courage !

#11 Le 23/10/2006, à 21:49

chapi

Re : [Résolu] apt-get et proxy avec authentification

Bonjour,

chose mystérieuse (bien que je ne crois pas aux mystères, surtout en informatique), j'ai maintenant accès à internet via apt-get ou aptitude pour mettre à jour mes paquets.

On dit souvent qu'il n'y a jamais besoin de redémarrer un linux, et bien c'est pourtant ce qui a du résoudre mon problème, bien que je n'en soit pas encore certain.

A la fin de l'installation d'Ubuntu server je ne pouvais pas sortir sur le net avec apt-get bien que ma configuration soit correcte. Après un redémarrage, plus de problème, sans toucher à la config. Peut être un petit bug dans le programme d'installation ?

Quoi qu'il en soit, pas d'authentication NTML (encore heureux, je ne sais même pas ce que c'est, enfin si je le sais, mais j'ai pas envie de le dire tongue), ni de proxy à contourner.

Problème (mystérieusement) résolu !

Hors ligne

#12 Le 27/10/2006, à 09:10

Amalsek

Re : [Résolu] apt-get et proxy avec authentification

Pour passer un proxy NTLS, une solution => ntlmaps (edgy)

En gros c'est un proxy en local qui se charge de faire passer les requêtes au proxy réel en utilisant l'authentification NTLS.

Hors ligne

#13 Le 04/05/2007, à 18:20

vieurou

Re : [Résolu] apt-get et proxy avec authentification

salut ,


j'ai installer aujourd'hui kubuntu 7.04. je suis a l'afpa de roubaix et ils ont un serveur isa (...quel idée..). Du coup j'arrive plus a faire d'apt-get .

j'ai pourtant installer ntlm, derniere version , j'ai bien ( à mon avis ) configuré le fichier serveur.cfg, mais pour autant ça ne fonctionne pas , pourtant dans le terminal , là ou j'ai lancé  "python main.py" j'ai :

    vieurou@vieurou-desktop:~/ntlmaps-0.9.9.0.1$ ./main.py
    NTLM authorization Proxy Server v0.9.9.0.1
    Copyright (C) 2001-2004 by Dmitry Rozmanov and others.
    Now listening at vieurou-desktop on port 8080
    Connected from 127.0.0.1:51018
    Connected from 127.0.0.1:51019
    Connected from 127.0.0.1:51020
    Connected from 127.0.0.1:51021
    Connected from 127.0.0.1:51022
    Connected from 127.0.0.1:51023
    Connected from 127.0.0.1:51024
    ....

ainsi de suite mais pas de donné qui arrive ( normalement , y a des petit points qui apparraissent pour signaller l'arriver de données)

je  joint un copier coller de mon fichier server.cfg :

    #========================================================================
    [GENERAL]
   
    LISTEN_PORT:8080
   
    # If you want APS to authenticate you at WWW servers using NTLM then just leave this
    # value blank like PARENT_PROXY: and APS will connect to web servers directly.
    # You can specify more than one proxy by leaving a space between each one, and
    # APS will detect when one fails and automatically fail-over to the next. EG:
    #PARENT_PROXY:first_proxy second_proxy third_proxy
    # And NOTE that NTLM cannot pass through another proxy server.
    PARENT_PROXY:isa.afpa-roubaix.local
   
    PARENT_PROXY_PORT:8080
   
    # APS will poll the upstream proxy and attempt to fail-over to a new one if it doesn't
    # get a response within an appropriate time frame.  The amount of time that it will
    # wait for a response before attempting fail-over is specified, in seconds, below:
    PARENT_PROXY_TIMEOUT:30
   
    # Set to 1 if you want to grant this authorization service to clients from other computers.
    # NOTE: all the users from other hosts that will be using you copy of APS for authentication
    # will be using your credentials in NTLM auth at the remote host.
    ALLOW_EXTERNAL_CLIENTS:0
   
    # If you want to allow some other but not all computers to use your proxy for authorization,
    # just set ALLOW_EXTERNAL_CLIENTS:0 and put friendly IP addresses here.
    # Use space as a delimiter.
    # NOTE that special addesses don't work here (192.168.3.0 for example).
    FRIENDLY_IPS:0
   
    # Requested URLs are written to "url.log" file. May be useful.
    URL_LOG:0
   
    # When a network service listens for connections, there is a maximum number of connection
    # attempts to that service that the underlying OS will allow to backlog waiting for a response
    # before the OS will start dropping new connection attempts with 'Connection refused'.  The
    # standard method of determining the maximum number of backlogged connections is to use the
    # SOMAXCONN constant, which is supposed to represent the maximum number that an OS will support
    # (for example, 5 on Windows 2000 Pro, and 200 on Windows 2000 server).  However, because this
    # is a statically compiled value in a Python distribution, usually this instead represents the
    # the most conservative value (5 on all Windows platforms, and 128 on the GNU/Linux variant I
    # tried).  So if you are running (for example) a massively threaded/parallel download manager,
    # the default value of, say, 5, or whatever SOMAXCONN happens to be set to, may be too low and
    # cause some connections to fail.  The value below can be set to any integer (it seems that
    # Python just silently caps values above the hard limit for the underlying platform), or it can
    # be set to the special value of SOMAXCONN (i.e. MAX_CONNECTION_BACKLOG:SOMAXCONN), to use
    # whatever this value happens to be set to in your Python build.  Setting this higher than
    # necessary may cause APS to consume more memory than you needed to.
    MAX_CONNECTION_BACKLOG:5
   
    #========================================================================
    [CLIENT_HEADER]
   
    # This section describes what and how the server should change in the clients headers.
    # Made in order to prevent parent proxy from seeing that you are using wget instead of IE5.5
   
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */*
    #User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
   
    # for windows 2000 emulation wink
    User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT5)
   
    # You can uncomment these chages in client's header to mimic IE5+ better, but in this case
    # you may expirience problems with *.html if your client does not really handle compression.
    Accept-Encoding: gzip, deflate
   
    #========================================================================
    [NTLM_AUTH]
   
    # Optional value, if leaved blank then APS will use gethostname() to determine
    # host's name.
    # NOTE1: If you Linux host name differs from Windows host name then it may be that
    #        MS server wont recognize you host at all and wont grant you access
    #        to resources requested. Then you have to use this option and APS will use
    #        this name in NTLM negotiations.
    # NOTE2: There are several reports that you can successfully use "foreign" host name
    #        here. Say, if user may access a resource from 'host1' and may not from 'host2'
    #        then there is a chance that APS running on 'host2' with NT_HOSTNAME:host1 will
    #        be able to be granted access to the restricted resource. However use this on
    #        you own risk as such a trick may be considered as a hack or something.
    NT_HOSTNAME: C008-pc-5216491.afpa-roubaix.local
   
    # Windows Domain.
    # NOTE: it is not full qualified internet domain, but windows network domain.
    NT_DOMAIN: afpa-roubaix.local
   
    # What user's name to use during authorization. It may differ form real current username.
    # If you enable NTLM_TO_BASIC, below, you can either leave this blank or simply
    # hash it out.
    USER: mon username
   
    # Password. Just leave it blank here and server will request it at the start time,
    # or, if you enable NTLM_TO_BASIC, below, you can either leave this blank or simply
    # hash it out, and you *won't* be prompted for a password at start time.
    PASSWORD: mon password
   
    # These two options replace old FULL_NTLM option.
    # NTLM authentication consists virtually of two parts: LM and NT. Windows95/98 use
    # only LM part, WindowsNT/2000 can use NT and LM or just NT part.
    # Almost always using just LM part will be enough. I had several reports
    # about LM and NT requirement and no about just NT.
    # So try to setup 1, 1 only if you have enough reasons to do so and when you understand
    # what you are doing.
    # 0, 0 is an illegal combination
    # NOTE: if you change these options then you have to setup flag option accordingly.
    LM_PART:1
    NT_PART:0
   
    # Highly experimental option. See research.txt for details.
    # LM - 06820000
    # NT - 05820000
    # LM + NT - 07820000
    NTLM_FLAGS: 06820000
   
    # This option makes APS try to translate NTLM authentication to very usual "Basic"
    # scheme. Almost all http clients know it. With this option set to 1 user will be requested
    # by his browser to enter his credentials and these username and password will be used by
    # APS for NTLM authentication at MS Proxy server or Web server.
    # In such a case different users can use one runnig APS with their own credentials.
    # NOTE1: currently translation works so it allows only one try for entering
    #        username/password. If you make a mistake you will have to restart you browser.
    # NOTE2: With debug:1 basic username/password will be written in log file in clear
    #        text format. I could try hide it, but the basic scheme is so weak that anybody
    #        who had access to APS would be able to get it.
    NTLM_TO_BASIC:0
   
    #========================================================================
    [DEBUG]
   
    # Set this to 1 if you want to see debug info in many log files. One per connection.
    DEBUG:0
   
    # Set this to 1 to get even more debug info.
    BIN_DEBUG:0
   
    # Set this to 1 to see some strange activity on screen. Actually you won't want it.
    SCR_DEBUG:1
   
    # Not actually a debug option but gives you some details on authentication process
    # into *.auth logs. Also see research.txt.
    AUTH_DEBUG:0
   


j'ai aussi editer le fichier  /etc/apt/apt.conf pour y ajouter :

    ACQUIRE {
    http::proxy "http://127.0.0.1:8080/"
    }

cela ne fonctionne pas non plus


Ce qui m'ettonne c'est qu'avec kubuntu 6.10, le tout fonctionné avec ntlmaps098, mais aujourd'hui , lorsque je lance le main.py j'ai :

    Traceback (most recent call last):
    File "./main.py", line 26, in <module>
    import server, logger
    File "lib/server.py", line 21, in <module>
    import proxy_client, www_client
    File "lib/proxy_client.py", line 22, in <module>
    import ntlm_auth, basic_auth
    File "lib/ntlm_auth.py", line 21, in <module>
    import ntlm_messages, utils, ntlm_procs
    File "lib/ntlm_messages.py", line 20, in <module>
    import ntlm_procs, utils
    File "lib/ntlm_procs.py", line 21, in <module>
    import des, md4, utils
    File "lib/des.py", line 20, in <module>
    import des_c, utils
    File "lib/des_c.py", line 22
    SyntaxError: Non-ASCII character '\xd7' in file lib/des_c.py on line 22, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

alors que ça fonctionner tres bien avec ubuntu 6.10, et tout est pareil car j'ai garder mon /home , je n'ai reinstaller que le  /


si quelqu'un  peut m'aider , ça me ferait super plaisir parceque là je bloque

merci d'avance

Hors ligne