LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   sudo yum via proxy doesnt resolve hosts but can is run as root (https://www.linuxquestions.org/questions/linux-newbie-8/sudo-yum-via-proxy-doesnt-resolve-hosts-but-can-is-run-as-root-4175422218/)

crawshaws 08-15-2012 11:41 AM

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.

crawshaws 08-15-2012 12:02 PM

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.


All times are GMT -5. The time now is 09:04 AM.