LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-15-2012, 11:41 AM   #1
crawshaws
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, 12:02 PM   #2
crawshaws
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.
 
  


Reply



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 10:37 AM
[SOLVED] sudo for www user to run root shell script via browser kzcom Linux - General 11 09-15-2010 01:48 AM
how come sudo doesnt make it so anybody can become root? smeezekitty Linux - Security 34 10-18-2009 04:48 PM
External Hosts Resolve but Local Hosts Do Not kjm9 Linux - Networking 7 11-19-2005 03:51 PM
allow sudo for www user to run root shell script cccc *BSD 12 07-23-2005 03:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:41 PM.

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