Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I must be missing something... I could swear I've done this before but I've torched the VM's that I was using previously.

How do you get apt-get to authenticate through a proxy that only supports NTLM? Do I need to change my proxy config to also support other authentication mechanisms?

Ubuntu 10.04.

share|improve this question

3 Answers 3

up vote 4 down vote accepted

in /etc/apt/apt.conf, add the line:

Acquire::http::Proxy "http://MYDOMAIN\MYNAME:MYPASS@MY.PROXY.COM:MYPORT";

the semicolon is required at the end of the line to add

share|improve this answer
    
Just checked my servers, and yes, it uses the semicolon. Well spotted sir! –  Grizly Mar 6 '13 at 6:00

A better alternative is to install CNTLM, which is an NTLM proxy that presents itself as an ordinary web proxy.

It's quite easy to install from .deb (trivial dependencies adduser and libc6 which should be on every system ever) and configure. Once you have it installed, you just tell apt-get to use proxy localhost:3128.

This solution has two advantages:

  1. it works for all programs using HTTP/HTTPS/FTP, including apt-get, web browsers, and SSH sessions tunneled over HTTPS (good for escaping the firewall if you need to.)

  2. your password is stored in cntlm.conf as a hash instead of in plain text.

CNTLM works on Windows as well. Very neat.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.