Sunday, September 30, 2007

proxy and yum

We have a proxy authentication system at our university and we need to use yum to install softwares on Fedora system. I usually do this after I become root but I don't store my proxy login and password on the system for security reasons. So I have put the following in the .bashrc file in my root home directory.

function proxy(){
echo -n "username:"
read -e username
echo -n "password:"
read -es password
export http_proxy="http://$username:$password@proxy.iitk.ac.in:3128/"
export ftp_proxy="http://$username:$password@proxy.iitk.ac.in:3128/"
}

So after I become root
$/bin/su
I invoke this function by typing
#proxy at the command prompt
and it works like a charm.

have fun with yum and proxy :D

Labels: , , , , , ,

0 Comments:

Post a Comment

<< Home