LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 06-25-2010, 01:24 AM   #1
ravibhure
Member
 
Registered: May 2007
Posts: 75

Rep: Reputation: 15
wget not working


Hi,
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@10.0.0.1/filename
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
IW2B
Member
 
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:

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

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

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
Hi

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:

Code:
wget -no-check-certificate https://admin:password@10.0.0.1/filename
 
Old 06-28-2010, 12:35 PM   #4
ravibhure
Member
 
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@10.0.0.1/filename.log

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@10.0.0.1/my...s&NFS=netapp00

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
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
You can give a try to --post-data (see man wget for details):
Code:
wget --no-check-certificate --post-data 'rootDir=logs&NFS=netapp00' https://admin:secretpass@10.0.0.1/mydir/subfolder/myapp.log

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


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
WGET command not working farooqkadri Linux - General 2 01-06-2010 01:40 PM
wget not working sumesh.pt 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

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

All times are GMT -5. The time now is 11:59 PM.

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