Ubuntu – Ubuntu Software Center Proxy with password

PROXYsoftware-center

The Ubuntu PC is behind a proxy server that requires a password. On Windows it automatically uses windows authentication (e.g. with Internet Explorer), or enter it manually (e.g. Avast). I did a search but could not find a similar question to address this issue.

I'm already aware of the global network proxy preferences (System > Preferences > Network Proxy), but it only takes the proxy server and port. This is not a problem with Firefox, because it prompts for the username and password. How do I make this work for Ubuntu's Software Center? It only prompts me for my user password, but the Ubuntu user is not a network user.

Error Detail: W:Failed to fetch http://extras.ubuntu.com/ubuntu/dists/maverick/main/source/Sources.gz 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )

I'm using Ubuntu 10.10, and my Linux skills are somewhat rusty.

EDIT: ddk's answer seems like what I'm looking for, but I cannot seem to get cntlm to work correctly. I followed the configuration steps he provided, and I updated to global network proxy to localhost:<listen_port> and removed my username and password (under detail). The test command sudo cntlm -M http://google.com/ passed, but when I test it with Firefox cntlm fails with the error "502 Parent proxy unreachable."

EDIT FIXED: It worked after I rebooted. The restart command invoke-rc.d cntlm restart does not restart, so the config file is never read.

Best Answer

You can use cntlm to manage ISA proxy settings.

To get around the catch 22 of installing it, without Ubuntu Software Center being able to connect to the internet, open synaptic, choose to install cntlm and go to File->Generate package download script. Open the script in a text editor and download and install the package manually.

There is a very thorough guide to configure cntlm here.