wget and Plone

9 Messages Forum Options Options
Permalink
ccccc
wget and Plone
Reply Threaded More
Print post
Permalink
I'm trying to to use wget to execute a script on my plone site and I keep getting a download of the login page.   To my knowledge I am using the user and password options of wget properly.   Has anyone experienced this behavior before?

Thanks,
Chris
David Durham, Jr.
Re: wget and Plone
Reply Threaded More
Print post
Permalink
On Thu, Jun 26, 2008 at 3:30 PM, ckelley <cpkelle@...> wrote:
>
> I'm trying to to use wget to execute a script on my plone site and I keep
> getting a download of the login page.   To my knowledge I am using the user
> and password options of wget properly.   Has anyone experienced this
> behavior before?

Well, let's see your command line.  Don't forget to include the real
username and password .. :)  This is probably a wget usage issue,
though.  Wget man page says:

       --user=user  --password=password

So I could see something like:

wget http://myplonesite/myscript --user=user  --password=password

-Dave

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
ccccc
Re: wget and Plone
Reply Threaded More
Print post
Permalink
This is what I'm getting.   Wget appears to work fine with other web sites.   Thanks.

------------

eec8:~ eechelp$ wget http://localhost:8080/Plone/scripts/run_gettime --user=[username removed]--password=[password removed]

--2008-06-26 18:03:01--  http://localhost:8080/Plone/scripts/run_gettime
Resolving localhost... 127.0.0.1, ::1, ::1 Connecting to localhost|127.0.0.1|:8080... connected.

HTTP request sent, awaiting response... 302 Moved Temporarily

Location:
http://localhost:8080/Plone/acl_users/credentials_cookie_auth/require_login?came_from=http%3A//localhost%3A8080/Plone/scripts/run_gettime [following]

--2008-06-26 18:03:02--  http://localhost:8080/Plone/acl_users/credentials_cookie_auth/require_login?came_from=http%3A//localhost%3A8080/Plone/scripts/run_gettime
Connecting to localhost|127.0.0.1|:8080... connected.

HTTP request sent, awaiting response... 200 OK
Length: 10938 (11K) [text/html]

Saving to: `require_login?came_from=http:%2F%2Flocalhost:8080%2FPlone%2Fscripts%2Frun_gettime'

100%[======================================================================================>] 10,938      --.-K/s   in 0s    

2008-06-26 18:03:03 (83.5 MB/s) - `require_login?came_from=http:%2F%2Flocalhost:8080%2FPlone%2Fscripts%2Frun_gettime' saved [10938/10938]
David Durham, Jr.
Re: wget and Plone
Reply Threaded More
Print post
Permalink
On Thu, Jun 26, 2008 at 5:07 PM, ckelley <cpkelle@...> wrote:
>
> This is what I'm getting.   Wget appears to work fine with other web sites.
> Thanks.

Do you get the same thing if you try .../Plone/manage ?

I've seen Plone issue an HTTP auth challenge, but perhaps it's just
redirecting to the login page instead.  You could also try logging in
with firefox, then pointing wget at your cookies file with

--load-cookies file


-Dave

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Bill Campbell-5
Re: wget and Plone
Reply Threaded More
Print post
Permalink
On Thu, Jun 26, 2008, ckelley wrote:
>
>I'm trying to to use wget to execute a script on my plone site and I keep
>getting a download of the login page.   To my knowledge I am using the user
>and password options of wget properly.   Has anyone experienced this
>behavior before?

You might consider using xmlrpc to get information from Plone as
there are good python libraries, and the procedure calls return
data in a form that is easy to use.

Bill
--
INTERNET:   bill@...  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186

We believe...that a mugger will kill you in the half-second it takes to
draw from the holster, but won't harm you while you dial the police on your
cell phone, talk to the dispatcher and wait half an hour for officers to
arrive. -- Gun-Control Net-work Credo

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Andreas Jung-5
Re: wget and Plone
Reply Threaded More
Print post
Permalink


--On 26. Juni 2008 13:30:20 -0700 ckelley <cpkelle@...> wrote:

>
> I'm trying to to use wget to execute a script on my plone site and I keep
> getting a download of the login page.   To my knowledge I am using the
> user and password options of wget properly.

Obviously not. Using the --http-user/password options of wget is supposed
to work. In addition check the Z2.log of the Zope server and the error_log
in the ZMI and google for "How to debug Unauthorized Plone".

-aj


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users

attachment0 (201 bytes) Download Attachment
sureshvv
Re: wget and Plone
Reply Threaded More
Print post
Permalink
ckelley wrote:
> I'm trying to to use wget to execute a script on my plone site and I keep
> getting a download of the login page.   To my knowledge I am using the user
> and password options of wget properly.   Has anyone experienced this
> behavior before?

Are you trying to login as a Zope user (using http authentication) or
are you using a Plone login? The latter uses cookie-based authentication
and will not work user http-auth.

Suresh


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
ccccc
Re: wget and Plone
Reply Threaded More
Print post
Permalink
I was using a Plone login.   This is probably what I am doing wrong.   Is there a way to force a Zope user login to accomplish this task?

Thanks!


sureshvv wrote:
ckelley wrote:
> I'm trying to to use wget to execute a script on my plone site and I keep
> getting a download of the login page.   To my knowledge I am using the user
> and password options of wget properly.   Has anyone experienced this
> behavior before?

Are you trying to login as a Zope user (using http authentication) or
are you using a Plone login? The latter uses cookie-based authentication
and will not work user http-auth.

Suresh


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Plone-Users mailing list
Plone-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users
danielle
Re: wget and Plone
Reply Threaded More
Print post
Permalink
Try
wget http://admin:password_admin@localhost:8090/script     --http-user=admin --http-password=password_admin
It works for me