You are not logged in.
Pages: 1
I use a proxy server to connect to the internet. I can export the http_proxy variable to access net via the shell. But using sudo before any command doesn't work with these settings.
wget http://link/
works, but
sudo wget http://link/
doesn't.
I require sudo to be used with pacman to upgrade my system.
Last edited by theta (2010-04-01 18:43:39)
Offline
If you only need the proxy variable for wget, you can change that in /etc/wgetrc
I'm not behind a proxy now, so I can't test this, but... does "sudo export" make it work as you would like? Keep in mind that exporting the proxy variable is local to the particular terminal instance.
"Computer Science is embarrassed by the computer." -- Alan J. Perlis
Offline
Why do you want to download stuff as root?
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
If you only need the proxy variable for wget, you can change that in /etc/wgetrc
I'm not behind a proxy now, so I can't test this, but... does "sudo export" make it work as you would like? Keep in mind that exporting the proxy variable is local to the particular terminal instance.
[theta@boolean-pc ~]$ sudo export http_proxy="http://user:pass@proxy.iist.ac.in:80/"
Password:
sudo: export: command not found
[theta@boolean-pc ~]$
So this can't be done. Thanks anyway for the suggestion.
Offline
sudo resets your environment variables whenever you run it. To disable this feature you can add:
Defaults !env_reset
to your sudoers file.
Offline
Pages: 1