LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-02-2011, 05:51 AM   #1
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Question Proxy Authentication on command line


Hi All,

I have a proxy with user and password in my network.

Normally, for password less proxies, we can export below variable to access internet (wget, ftp, http)

http_proxy=http://10.1.23.100:80/

But if in case I have domain credentials like
Quote:
username = abc\vikas
password = password@27
This works well on mozilla in runlevel 5.

I googled and tried the below options, but none worked for me.
Code:
http_proxy=http://abc\vikas:password@27:10.1.23.100:80/
http_proxy=http://abc\\vikas:password@27:10.1.23.100:80/
http_proxy=http://"abc\vikas":"password@27":10.1.23.100:80/
http_proxy=http://"abc\vikas:password@27":10.1.23.100:80/
http_proxy=http://'abc\vikas:password@27':10.1.23.100:80/
http_proxy=http://'abc\vikas':'password@27':10.1.23.100:80/
My goal is to access http urls via yum.

Any suggestions friends ?

Last edited by vikas027; 09-02-2011 at 05:53 AM. Reason: more infor
 
Old 09-02-2011, 05:59 AM   #2
hi2arun
Member
 
Registered: Apr 2010
Distribution: Fedora
Posts: 109
Blog Entries: 4

Rep: Reputation: 34
Did you try

http_proxy=http://abc\\vikasassword\@27@10.1.23.100:80
 
Old 09-02-2011, 06:23 AM   #3
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by hi2arun View Post
Did you try

http_proxy=http://abc\\vikasassword\@27@10.1.23.100:80
Not working
 
Old 09-07-2011, 06:56 AM   #4
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Any other ideas/suggestions gurus ?
 
Old 09-14-2011, 04:53 AM   #5
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Any ideas gurus ?
I tried many options but none is working from me.
 
Old 09-14-2011, 07:03 AM   #6
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
I think you have the quotes wrong as they should surround the entire proxy string. Also, in your examples you tried (posted above) you didn't have an '@' between the password and IP of your proxy. Not sure if that was a typo on your part.
I am also not sure if you need to escape the domain name and '@' in the password.

Technically I this should work:
Code:
export HTTP_PROXY='http://abc\vikas:password@27@10.1.23.100:80'
but if it doesn't, you might try variations such as:
Code:
export HTTP_PROXY='http://abc\\vikas:password\@27@10.1.23.100:80'
or

Code:
export HTTP_PROXY='http://abc\vikas:password\@27@10.1.23.100:80'
 
Old 09-15-2011, 11:57 AM   #7
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Unhappy

Quote:
Originally Posted by zQUEz View Post
I think you have the quotes wrong as they should surround the entire proxy string. Also, in your examples you tried (posted above) you didn't have an '@' between the password and IP of your proxy. Not sure if that was a typo on your part.
I am also not sure if you need to escape the domain name and '@' in the password.

Technically I this should work:
Code:
export HTTP_PROXY='http://abc\vikas:password@27@10.1.23.100:80'
but if it doesn't, you might try variations such as:
Code:
export HTTP_PROXY='http://abc\\vikas:password\@27@10.1.23.100:80'
or

Code:
export HTTP_PROXY='http://abc\vikas:password\@27@10.1.23.100:80'
Thanks zQUEz, I have tried this too but it is not working for me.
 
Old 10-14-2011, 04:06 AM   #8
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Dear All,

Has anyone faced this issue ?

Any idea how to get proxy authentication working on command line.
 
Old 12-28-2011, 08:09 AM   #9
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
This worked for some people not me

http://www.sohailriaz.com/how-to-con...-proxy-server/
http://www.howtoforge.com/how-to-con...etting-for-yum
[/url]http://prefetch.net/blog/index.php/2011/11/09/configuring-wget-to-use-a-proxy-server/[/url]

May be these links prove useful for others.

Last edited by vikas027; 01-30-2012 at 11:05 AM.
 
Old 01-05-2012, 01:08 AM   #10
chnedward
LQ Newbie
 
Registered: Jan 2012
Posts: 1

Rep: Reputation: Disabled
Try to substitute all

'@' to '%40'
'/' to '%5C'

in username and password. Hope that works!

Last edited by chnedward; 01-05-2012 at 01:15 AM.
 
Old 01-06-2012, 03:09 PM   #11
leblinux
Member
 
Registered: Dec 2008
Posts: 49

Rep: Reputation: 0
I have had this issue in my university proxy and solved it by simply changing the password '@' to '%' or '#' and it worked!
however let me know of what chnedward suggested works or not.

Last edited by leblinux; 01-06-2012 at 03:12 PM.
 
Old 01-09-2012, 08:11 AM   #12
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Unhappy

Hi chnedward and leblinux,

Many thanks for your time and efforts. But I have tried removing all "@" or "#" from my username/password.

I simply gave Vikas027 as password, but then also it did not worked.
 
  


Reply



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
test a remote proxy from the command line cccc Linux - Networking 2 09-22-2014 05:44 AM
squid proxy authentication htpasswd command problem sonykarthik71 Linux - Server 2 12-02-2008 05:25 AM
Linux Command Line Proxy ifeatu Linux - Newbie 3 10-30-2008 08:04 PM
Command line only Proxy setup Xorgroth Debian 4 04-03-2008 03:37 PM
Command Line e-mail client w/Authentication Needed!! rootking Linux - Software 8 12-04-2005 07:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:58 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