[Bug 556293] Re: sudo does not keep http_proxy environment variable
** Tags added: patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/556293 Title: sudo does not keep http_proxy environment variable -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
** Patch added: pass-through xxx_proxy variables to sudo user's environment https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/556293/+attachment/1842496/+files/keepenv-xxx_proxy.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/556293 Title: sudo does not keep http_proxy environment variable -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
** Patch added: alternative xxx_proxy env variable solution using sudoers config file https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/556293/+attachment/1842537/+files/sudoers_keep_env-xxx_proxy.patch -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/556293 Title: sudo does not keep http_proxy environment variable -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
Since in the main (ubuntu) menu System Network Proxy, you have an apply system wide, this http_proxy variable should be taken care of somehow... Either a/ by passing it through sudo b/ the menu configuration add it somewhere somehow so that sudo get initialized with the global official variable (if a sudo.initial_env file would have existed, should be placed there). solution b is more security-proof. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/556293 Title: sudo does not keep http_proxy environment variable -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
one more solution is # sudo -i aptitude install ... -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/556293 Title: sudo does not keep http_proxy environment variable -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
Here are two work arounds that I use: 1) adding to /etc/sudoers: Defaults env_keep = http_proxy https_proxy ftp_proxy or 2) sudo -E apt-get install ... Hope this gets fixed soon too. -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
This is very annoying. I have modified cntlm proxy to work with basic auth. And everything was working fine till this bug appeared. I do no su ever. So exporting my variables with sudo worked okay. And when I tried to do an apt-get it just failed to resolve the host names. I started debugging my local proxy when I realized that apt-get does not send any requests to it at all. Why in the name of )==() does this pass through unnoticed? If the solution is as simple as Geraldo comments, I suggest it is released in a patch pretty soon. Atleast all the proxy environment variables should be saved. My work around for the solution was to explicitly add a proxy line in apt.conf. But now I need to remove it everytime I get out from behind the proxy and start using direct connections. Hope this gets fixed soon. -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
Confirmed bug. ** Changed in: sudo (Ubuntu) Status: New = Confirmed -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
Sudo doesn't preserve http_proxy environment variable anymore by default in Ubuntu 10.04. :-( To see the (hardcoded) list of variable preserved by sudo, use the command: sudo -V Solution: add to /etc/sudoers (via sudoers command) the following line: Defaults env_keep=http_proxy Now, $http_proxy is available to all commands run via sudo, check it using: sudo env | grep proxy Nonetheless, I think http_proxy should be in that hardcoded list. -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
The symptoms described are due to changes made for bug 432631. Perhaps this should be marked as a duplicate (though it's kind of an anti- duplicate!) The documentation of this change is in /usr/share/doc/sudo/changelog.Debian.gz: sudo (1.7.2p1-1ubuntu4) lucid; urgency=low * env.c: Revert addition of http_proxy again. This was an Ubuntu specific EBW hack, caused inconsistencies with other proxy variables (such as https_proxy and ftp_proxy), made sudo incompatible to upstream behaviour/documentation. This is solved in a much better way in apt itself and gnome-network-properties now. (LP: #432631) [changes in intervening versions elided] -- Martin Pitt martin.p...@ubuntu.cosudo (1.7.0-1ubuntu1) karmic; urgency=low [...] - env.c: Add http_proxy to initial_keepenv_table, so that it is kept for sudo apt-get (Ubuntu specific EBW hack, should disappear at some point) -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
workaround for apt/apt-get: put this line into /etc/apt/apt.conf Acquire::http::Proxy http://hostname:port/;; -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
probably pretty much bug 207768. A workaround is described there in bug 207768 comment #4: Add smth like Defaults env_keep=no_proxy http_proxy XAUTHORIZATION XAUTHORITY TZ PS2 PS1 PATH MAIL LS_COLORS KRB5CCNAME HOSTNAME HOME DISPLAY COLORS to your /etc/sudoers. -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
In a production server with ubuntu 7.04, a sudo -s and export returns the setting of the user which gave the sudo command. This looks like normal behaviour to me. On 10.04 when I'm a normal user, and do a: sudo echo $http_proxy I get my proxy settings. While doing the sudo -s and export, its empty, even though the proxy is set as system wide. So, I do think its a bug. Maybe not because of the system wide info, but because of the proxy settings from the current user how executes the sudo command. Im sure that in former versions this was working, and for system administrators I can't imagine this is wanted behaviour. Why do you else set the system wide proxy settings? -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
ow, as extra information, the following will also not work: sudo -s export http_proxy=http://???.???.???.???:8080 sudo wget http://whatever.url.something Wont work also. Im sure this shouldn't be the wanted behaviour? For your alias solution, I'm sure it will work, but I think this should work out of the box. Its the same issue for the apt-get problem reported in another bug. And maybe even more bugs, but not sure about that. -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
Not sure that's a bug. In hardy, man sudo said nothong about the fact that sudo keeps http_proxy environment variable. My workaround is the alias alias sudop='sudo http_proxy=$http_proxy' with simple quotes! -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
This is a serious bug since installation of packages works only over synaptic anymore. Neither sudo apt-get install package nor apt://package work anymore. Thanks for caring about this. -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
In the final release of 10.04, after using sudo, the http_proxy setting is gone. The proxy setting has been set with the 'system wide' option. In a shell of a normal user, its visible: export declare -x http_proxy=http://192.168.???.???:8080/; declare -x https_proxy=https://192.168.???.???:8080/; declare -x no_proxy=localhost,127.0.0.0/8,*.local, but, after a sudo -s, its gone: sudo -s # export ... (no http_proxy) the right information about the settings can be found in the /etc/enviroment file. I guess the sudo command doesn't look at this file, or it doesn't take the settings from the current user with it. This is why 'sudo wget...' and also the 'sudo apt-get install flash...' doesn't work. After sudo -s, add the proxy settings with: export http_proxy=http://192.168.???.???:8080;, and then 'apt-get install...' it works flowless -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
It's not just apt-get. I have noticed the same issue with wget. wget works fine through the proxy when run as user and as root (through sudo -s) However sudo wget ___ fails to use the proxy settings. The same settings work fine in 9.10 -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
I am getting the following error message: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid- updates/multiverse/source/Sources.gz 407 Proxy Authentication Required This is after attempting to set the proxy via: $ export http_proxy=username:passw...@my.proxy.org:port This setting has worked in previous releases from 8.04 to 9.10 -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
Related post in https://bugs.launchpad.net/ubuntu/+source/wget/+bug/554068 (by humble_coffee) «« I am also having issues with wget behind a proxy. Trying to download any address that requires proxy authorization fails with the following message: failed: Connection timed out. Also it seems to be trying to connect using port 80. Shouldn't it be using the port specified in the proxy setting? I have the proxy configured correctly in the Gnome Network Proxy Preferences and everything else that needs proxy access works fine, with the exception of apt-get. It's error message is: 407 Proxy Authentication Required »» -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 556293] Re: sudo does not keep http_proxy environment variable
it also affects me. I circumvent it using: 1) sudo sh 2) apt-get install ... See example in https://bugs.launchpad.net/ubuntu/+source/wget/+bug/554068, that is a but related to wget -- sudo does not keep http_proxy environment variable https://bugs.launchpad.net/bugs/556293 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs