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'm having quite a strange behavior with wget since yesterday.

I can download files by using sudo wget, but when I try the same file with only wget, I can get this error:

yusufh@ubuntu-yuh:~$ wget http://www.kegel.com/wine/winetricks
--2010-12-17 09:34:11--  http://www.kegel.com/wine/winetricks
Resolving www.kegel.com... failed: Name or service not known.
wget: unable to resolve host address `www.kegel.com'

and with sudo wget:

yusufh@ubuntu-yuh:~$ sudo wget http://www.kegel.com/wine/winetricks
--2010-12-17 09:35:37--  http://www.kegel.com/wine/winetricks
Connecting to 127.0.0.1:5865... connected.
Proxy request sent, awaiting response... 200 OK
Length: 190672 (186K) [text/plain]
Saving to: `winetricks'

100%[==================================================================================================>] 190,672     --.-K/s   in 0.03s   

2010-12-17 09:35:37 (6.92 MB/s) - `winetricks' saved [190672/190672]

After the comments below, here is an update:

I can use Google Chrome or Firefox perfectly without running it as root.

I use ntlmaps to connect to the office proxy. So I need to use 127.0.0.1:5865 as the proxy for clients.

Result for env | grep -i proxy:

NO_PROXY=localhost,127.0.0.0/8,*.local,
http_proxy=127.0.0.1:5865
ftp_proxy=127.0.0.1:5865
all_proxy=socks://127.0.0.1:5865/
ALL_PROXY=socks://127.0.0.1:5865/
https_proxy=127.0.0.1:5865
no_proxy=localhost,127.0.0.0/8,*.local

while sudo env | grep -i proxy is empty!

HELP!

share|improve this question
1  
Are other programs able to resolve DNS names without being root? If not, what are the permissions on the files used by the NSS (Name Service Switch) system, including /etc/hosts and /etc/resolv.conf? –  Michael Trausch Dec 17 '10 at 5:56
    
Yes, I'm able to use Google chrome; that's about the only program that uses Internet without root. –  Yusuf Dec 17 '10 at 10:05
add comment

2 Answers

Connecting to 127.0.0.1:5865... connected. Proxy request sent, awaiting response... 200 OK

What does it mean?

Hint: compare env | grep -i proxy with sudo env | grep -i proxy

share|improve this answer
    
nice pickup. I missed that at first glance. –  benc Dec 17 '10 at 8:22
    
I use ntlmaps to connect to the office proxy. So I need to use 127.0.0.1:5865 as the proxy for clients. env | grep -i proxy gives NO_PROXY=localhost,127.0.0.0/8,.local, http_proxy=127.0.0.1:5865 ftp_proxy=127.0.0.1:5865 all_proxy=socks://127.0.0.1:5865/ ALL_PROXY=socks://127.0.0.1:5865/ https_proxy=127.0.0.1:5865 no_proxy=localhost,127.0.0.0/8,.local, while sudo env | grep -i proxy is empty! –  Yusuf Dec 17 '10 at 10:09
add comment
up vote 0 down vote accepted

OK, problem solved.

It was in fact a bug with the gnome-terminal of Ubuntu 10.04.

I found my answer here.

In brief, just do a

sudo apt-get install gnome-terminal

Then close the terminal and launch it again! Such a simple solution for such a big problem!! :D

That's why you should always keep you Ubuntu updated :P (I didn't want to upgrade because I wanted to test some other things first, and the Internet connection is quite slow here; but I think I'd better do it now!!)

share|improve this answer
add comment

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.