LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-04-2011, 04:23 PM   #1
noob14
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Rep: Reputation: Disabled
automatic proxy authentication


Hi,

I have a corporate proxy set up and I am working on linux. Every time i need to access the internet from the terminal i need to put in the proxy details. I ve also configured the http_proxy variable in the bashrc file.
What can i do so I dont have to do this every time.
specifically i m trying to use curl.
 
Old 10-05-2011, 01:39 AM   #2
svu
Member
 
Registered: Apr 2005
Distribution: Slackware 13.37
Posts: 36

Rep: Reputation: 1
Hello,

I've done something like this in my /etc/profile configuration file.
Mind you this file is for "system-wide defaults used by all Bourne (and related) shells"

Code:
export http_proxy="http://username:password@ip_of_proxy_server:port/"
export ftp_proxy="http://username:password@ip_of_proxy_server:port/"
export HTTP_PROXY="http://username:password@ip_of_proxy_server:port/"
export FTP_PROXY="http://username:password@ip_of_proxy_server:port/"
If your make any changes to it you can reload the new settings with the following command :

Code:
source /etc/profile
There is an order of configuration files that's being used if they exist.
Should you want your settings to only apply to certain users and not system wide you probably should look into the different files (and not /etc/profile) :

~/.bash_profile, ~/.bash_login, ~/.profile

Check "man bash" for more info.

Quote:
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.
I hope this helps.

Last edited by svu; 10-05-2011 at 01:55 AM.
 
Old 10-06-2011, 09:06 AM   #3
noob14
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
I ve already done that and that does not do the trick..i still cant make a http connection without putting in the proxy details everytime
 
Old 10-06-2011, 01:50 PM   #4
svu
Member
 
Registered: Apr 2005
Distribution: Slackware 13.37
Posts: 36

Rep: Reputation: 1
I don't have details about the proxy server configuration at my workplace but there is something called "proxy" and "autoproxy" going on...

I can ping "proxy" and it gives me an IP address "autoproxy" gives me another IP address.

I use the IP address I get from autoproxy because only that IP address seems to work for the authentication.

Maybe something similar is going on on your network ?

Last edited by svu; 10-06-2011 at 04:41 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
squid proxy authentication and without authentication reaven Linux - Server 1 06-06-2011 06:52 AM
Iceweasel Automatic Proxy Configuration URL dinesh.4126 Linux - Software 1 04-21-2010 04:34 PM
Automatic authentication PlatinumX Linux - Security 12 04-16-2010 04:21 AM
how to set automatic proxy for shell commands? dwater Linux - Networking 9 02-22-2009 09:29 AM
Konqueror automatic smb authentication teamanx Linux - Networking 3 03-19-2008 07:13 AM

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

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

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