Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-15-2012, 12:41 PM   #1
LQ Newbie
Registered: Jul 2006
Posts: 11

Rep: Reputation: 2
sudo yum via proxy doesnt resolve hosts but can is run as root

Ok so i have a weird problem and i cant seem to figure this one out.

I am connecting from behind a proxy server and have a second account "CRAWSHAWS" in the sudoers file with the permissions to run ALL commands.

Problem is, if i run `sudo yum install <package> -y` when logged in as CRAWSHAWS i get a long list of "failed to resolve host" messages, where as if I run `yum install <package> -y` directly as root, all is ok....

What is going on here.

Please let me know what files you need to see?

Thanks in advance.
Old 08-15-2012, 01:02 PM   #2
LQ Newbie
Registered: Jul 2006
Posts: 11

Original Poster
Rep: Reputation: 2
Never mind.
Me being silly.

I had set the proxy server in an environment variable `http_proxy` and of course sudo was set to reset environment variables.

I have since entered the proxy into the `/etc/yum.conf` file and all is working now.

P.S. You could also get around this by setting `Defaults !env_reset` in the `/etc/sudoers` file.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 16 Yum [Errno 14] curl#5 - "Couldn't resolve proxy" manqox Fedora 4 04-26-2012 11:37 AM
[SOLVED] sudo for www user to run root shell script via browser kzcom Linux - General 11 09-15-2010 02:48 AM
how come sudo doesnt make it so anybody can become root? smeezekitty Linux - Security 34 10-18-2009 05:48 PM
External Hosts Resolve but Local Hosts Do Not kjm9 Linux - Networking 7 11-19-2005 04:51 PM
allow sudo for www user to run root shell script cccc *BSD 12 07-23-2005 04:48 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:47 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration