WGET in Ubuntu( vistual img ) vs Red Hat

Hi
I need to fetch a file using wget command.
In read Hat I have the file I need without any problem while in Ubuntu ( installed on a virtual image ) it doesn't work.
More precisely my wget need to fetch a page from a web site with secure authentication so teh syntax I am using is

wget --http-user=<username> --http-password=<pwd> -O myfile.csv "https::<myurl>"

What could be the reason and how to fix it?

"It doesn't work" is quite useful as an error description if there were any psychics around. Until then, could you be a bit more specific?

What errors do you get? Do you get any errors at all? What virtualization software are you using? How does the guest OS connect to the network? Is the network accessible at all, eg can you ping anything? Any firewalls that might be active?

you are right and I am sorry for that.
In red Hat I have the .csv file I have while in Ubuntu I download a file containing the HTML code for the login page of the web site I want to access. with the User / Password field and the Login button.

We're (slowly) starting to get somewhere. What's the version of wget on the different machines? Is there any other noteworthy difference in configuration, eg. different subnets or network paths? How does the web site authenticate an user? Through basic authentication, NTLM, or maybe cookies?

In ubuntu there is VNU Wget 1.11.4 while in RedHat is GNU 1.10.2 ( Red Hat modified ).
I don't know what kind of authentication I am using; my guess is cookies because if I close the browser and reopen I am still authenticated.
With Basic authentication I should expect some window to popup. If it is NLTM I don't know..what I can see for the network properties? ( I am a bit newbie )

With NTLM you'd get the same authentication window as with basic authentication, only you'd authenticate against a MS domain.

By your description I'd say cookies, too, which usually isn't something that wget can do by itself. The --http-* options usually are only for basic/digest authentication, so cookie authentication is either a feature from the modified wget binary on Red Hat, or there's some other factor.

There are 3 options that could work:

  • Create a "cookie jar" that can be used with wget's --load-cookies
  • Pass the cookie required using wget's --header (see the man page for more details)
  • Switch to curl and use -b/--cookie to pass a cookie along

Details depend on what cookies the site expects to be set to what values.

Ok. I will try all of these.
Thank you very much for your help
Kind regards
cs

Hi
I am coming back with some delay but I solved the problem.
There are difference between version prior to 10.4.2 and following.
If you are using latest version you need to add an options called --auth-no-challenge
Bye