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 24/09/2014, à 14:01

DavidTheDolphin

[Résolu] wget via proxy vers sharepoint 401 Unauthorized sauf sous W7

Bonjour,

Je viens vers vous avant de me pendre !
Je dois récupérer des documents (dont je trouve l'url en scrutant des XML) sur un serveur Sharepoint 2010 via un proxy, j'utilise donc logiquement wget hors pas moyen de me connecter, j'obtiens inexorablement du 401 Unauthorized...

J'ai testé de coller une de ces URL directement dans Firefox --> Ca marche
J'ai exporté mes cookies de Firefox et les ai chargés dans wget --> 401
Même commande wget (même version) dans une machine virtuelle Windows 7 (même proxy) --> Ca marche
Même commande wget dans une autre machine Ubuntu 12.04 64 sans proxy --> Ca marche
Même commande avec une version compilée pour l'occasion plus récente de wget (1.15) sur mon Ubuntu 12.04 + proxy --> 401
Même commande, même proxy sur une Fedora 20 + wget 1.14 --> 401
J'ai aussi tenté de changer le user agent de wget --> 401

Je suis sur Ubuntu 12.04 64 avec un wget 1.13.4 (mais une 1.15 ne fonctionne pas mieux)
Ma commande :

wget --user=wam --ask-password --no-check-certificate --auth-no-challenge --server-response https://lesharepoint.fr/xxx/lefichier.ext

Réponse Ubuntu :

Mot de passe pour l'utilisateur «wam» : 
--2014-09-24 13:41:54--  https://lesharepoint.fr/xxx/lefichier.ext
Connexion vers leproxy:80... connecté.
requête Proxy transmise, en attente de la réponse... 
  HTTP/1.1 401 Unauthorized
  Date: Wed, 24 Sep 2014 11:41:49 GMT
  Server: Microsoft-IIS/7.5
  SPRequestGuid: a015f731-d8e9-4d8e-ada0-1b677f116f6d
  WWW-Authenticate: NTLM
  X-Powered-By: ASP.NET
  MicrosoftSharePointTeamServices: 14.0.0.6123
  X-MS-InvokeApp: 1; RequireReadOnly
  Content-Length: 0
  Set-Cookie: BIGipServerSharepoint-2010_https_pool=3574077612.47873.0000; path=/
  Connection: close
  Content-Type: application/msword
Connexion vers leproxy:80... connecté.
requête Proxy transmise, en attente de la réponse... 
  HTTP/1.1 401 Unauthorized
  Date: Wed, 24 Sep 2014 11:41:49 GMT
  Server: Microsoft-IIS/7.5
  SPRequestGuid: f0a3ce0f-3b3d-4ae5-83fe-82d357130e8c
  WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADgAAAAGAoECCxXxkZizxF8AAAAAAAAAAMIAwgBAAAAABgGxHQAAAA9FWENIQU5HRQIAEABFAFgAQwBIAEEATgBHAEUAAQAWAEEARgBXADIAUwBQAFcARgBFADAAMgAEACYAZQB4AGMAaABhAG4AZwBlAC4AYQBkAC4AYQBmAHAAYQBuAGUAdAADAD4AQQBGAFcAMgBTAFAAVwBGAEUAMAAyAC4AZQB4AGMAaABhAG4AZwBlAC4AYQBkAC4AYQBmAHAAYQBuAGUAdAAFABQAYQBkAC4AYQBmAHAAYQBuAGUAdAAHAAgAULVmh+zXzwEAAAAA
  X-Powered-By: ASP.NET
  MicrosoftSharePointTeamServices: 14.0.0.6123
  X-MS-InvokeApp: 1; RequireReadOnly
  Content-Length: 0
  Connection: close
  Content-Type: application/msword
Connexion vers leproxy:80... connecté.
requête Proxy transmise, en attente de la réponse... 
  HTTP/1.1 401 Unauthorized
  Date: Wed, 24 Sep 2014 11:41:49 GMT
  Server: Microsoft-IIS/7.5
  SPRequestGuid: 0946db7e-e882-4e2b-a58b-865c4ed1deb8
  WWW-Authenticate: NTLM
  X-Powered-By: ASP.NET
  MicrosoftSharePointTeamServices: 14.0.0.6123
  X-MS-InvokeApp: 1; RequireReadOnly
  Content-Length: 0
  Connection: close
  Content-Type: application/msword
ÉCHEC d'autorisation.

Réponse Windows 7 :

Password for user 'wam':
--2014-09-24 13:45:18--  https://lesharepoint.fr/xxx/lefichier.ext
Resolving lesharepoint.fr (lesharepoint.fr)... IP_du_sharepoint
Connecting to lesharepoint.fr (lesharepoint.fr)|IP|:443... connected.
WARNING: cannot verify lesharepoint.fr's certificate, issued by '/C=US/O=VeriSign
, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa
 (c)10/CN=VeriSign Class 3 International Server CA - G3':
  Self-signed certificate encountered.
HTTP request sent, awaiting response...
  HTTP/1.1 401 Unauthorized
  Server: Microsoft-IIS/7.5
  SPRequestGuid: dbb22889-33f7-45d4-b229-4ab1e9a2df4f
  WWW-Authenticate: NTLM
  X-Powered-By: ASP.NET
  MicrosoftSharePointTeamServices: 14.0.0.6123
  X-MS-InvokeApp: 1; RequireReadOnly
  Date: Wed, 24 Sep 2014 11:45:14 GMT
  Content-Length: 0
  Set-Cookie: BIGipServerSharepoint-2010_https_pool=3691518124.47873.0000; path=
/
Reusing existing connection to lesharepoint.fr:443.
HTTP request sent, awaiting response...
  HTTP/1.1 401 Unauthorized
  Server: Microsoft-IIS/7.5
  SPRequestGuid: bb34f203-e2fa-4158-b6aa-1a42d3c8f550
  WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADgAAAAGAoEC1rmAc2aI7d8AAAAAAAAAAMI
AwgBAAAAABgGxHQAAAA9FWENIQU5HRQIAEABFAFgAQwBIAEEATgBHAEUAAQAWAEEARgBXADIAUwBQAFc
ARgBFADAANAAEACYAZQB4AGMAaABhAG4AZwBlAC4AYQBkAC4AYQBmAHAAYQBuAGUAdAADAD4AQQBGAFc
AMgBTAFAAVwBGAEUAMAA0AC4AZQB4AGMAaABhAG4AZwBlAC4AYQBkAC4AYQBmAHAAYQBuAGUAdAAFABQ
AYQBkAC4AYQBmAHAAYQBuAGUAdAAHAAgAnFM1Ae3XzwEAAAAA
  X-Powered-By: ASP.NET
  MicrosoftSharePointTeamServices: 14.0.0.6123
  X-MS-InvokeApp: 1; RequireReadOnly
  Date: Wed, 24 Sep 2014 11:45:14 GMT
  Content-Length: 0
Reusing existing connection to lesharepoint.fr:443.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Cache-Control: private,max-age=0
  Content-Length: 375296
  Content-Type: application/msword
  Expires: Tue, 09 Sep 2014 11:45:14 GMT
  Last-Modified: Fri, 19 Sep 2014 02:27:03 GMT
  ETag: "{8439B861-1C63-4FEB-9CDB-95AE708938F7},2"
  Server: Microsoft-IIS/7.5
  SPRequestGuid: d8d8b8f0-4a4a-4767-9139-2bb5dc03f18a
  X-SharePointHealthScore: 0
  ResourceTag: rt:8439B861-1C63-4FEB-9CDB-95AE708938F7@00000000002
  Public-Extension: http://schemas.microsoft.com/repl-2
  Persistent-Auth: true
  X-Powered-By: ASP.NET
  MicrosoftSharePointTeamServices: 14.0.0.6123
  X-MS-InvokeApp: 1; RequireReadOnly
  Date: Wed, 24 Sep 2014 11:45:14 GMT
Length: 375296 (367K) [application/msword]
Saving to: 'lefichier.doc'

100%[======================================>] 375,296     1.54MB/s   in 0.2s

2014-09-24 13:45:19 (1.54 MB/s) - 'lefichier.doc' saved
[375296/375296]

J'attire votre attention sur le fait que sous Ubuntu wget indique l'IP:PORT du proxy alors que sous W7 ce sont ceux du serveur sharepoint...

Please heeeeellllppp !

Dernière modification par DavidTheDolphin (Le 24/09/2014, à 16:09)

Hors ligne

#2 Le 24/09/2014, à 15:58

ned.net

Re : [Résolu] wget via proxy vers sharepoint 401 Unauthorized sauf sous W7

Hello,

essaie avec curl, car j'ai cru lire que wget n'est pas copain avec le protocole d'authentification NTLM :

curl --anyauth --user 'wam':'mon_password' -O https://lesharepoint.fr/xxx/lefichier.ext

hth


il n'y a qu'en se plantant
qu'une graine peut germer

Hors ligne

#3 Le 24/09/2014, à 16:02

DavidTheDolphin

Re : [Résolu] wget via proxy vers sharepoint 401 Unauthorized sauf sous W7

Ha oui, ça marche tout de suite vachement mieux big_smile

Merkiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii big_smile

Hors ligne