Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 06-25-2010, 01:24 AM   #1
Registered: May 2007
Posts: 75

Rep: Reputation: 15
wget not working

I am trying to download data/file from web server where htpassword has been setup, I have tried with browser it its working fine, but when trying to same with 'wget' its not working, can you please suggest how to download the file.
Below is the command I am using.

wget https://adminassword@
admin[:]password (may be smily get overide)

Last edited by ravibhure; 06-25-2010 at 01:26 AM.
Old 06-25-2010, 03:48 AM   #2
Registered: Aug 2008
Location: Denmark
Distribution: Fedora, Ubuntu, Solaris
Posts: 35

Rep: Reputation: 19
Hi Ravi,

Is it an authentication error that you are getting like the following?:

"HTTP request sent, awaiting response... 401 Authorization Required Authorization failed"

Your command syntax works fine for my on Fedora 13, GNU Wget 1.12. Perhaps its a character in the password that is causing problems if its not escaped properly, i.e. if it contains a ! or "... it may need to be escaped with a backslash before it.

If your version off wget supports it, you can also try the following:

wget --user=admin --ask-password
then type the password when prompted, it will at least confirm that the wget/username/password combination is actually working.

Old 06-25-2010, 03:51 AM   #3
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,317

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350

What kind of error message do you get? One common problem is that the certificate is not properly signed. The first time you tried it with a browser, did you get some message about the certificate? If you clicked continue and add exception to make it work, you need to do the same for wget.

You can use the extra option --no-check-certificate with wget, like this:

wget -no-check-certificate https://admin:password@
Old 06-28-2010, 12:35 PM   #4
Registered: May 2007
Posts: 75

Original Poster
Rep: Reputation: 15
Hi Guttorm/Ian,
I am able to download file now
wget --no-check-certificate https://admin:secretpass@

but still I am not able to download the files those are in query string, please suggest the way to download these.

wget --no-check-certificate https://admin:secretpass@

It gives an error 404 not Found, to verify I have check the file founds when I open it through browser.
Old 06-28-2010, 01:52 PM   #5
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
You can give a try to --post-data (see man wget for details):
wget --no-check-certificate --post-data 'rootDir=logs&NFS=netapp00' https://admin:secretpass@

Last edited by colucix; 06-28-2010 at 01:53 PM.


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
WGET command not working farooqkadri Linux - General 2 01-06-2010 01:40 PM
wget not working Linux - Software 22 09-21-2009 08:31 AM
wget not working! but "man wget is" ??? wrapster Solaris / OpenSolaris 5 07-30-2008 03:00 AM
ftp & wget login not working vous Linux - Software 5 02-10-2005 02:22 PM
Wget -x not working? coyote399 Linux - Software 1 11-20-2004 01:35 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:29 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration