Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to write a bash script that will notify me about changes on a trac wiki timeline. Unfortunately I can't "login" (it needs cookie for next logins).

wget \
--save-cookies=cookies --keep-session-cookies

wget \
--load-cookies=cookies \ --keep-session-cookies\

I get:

Error 400: Bad Request

I also tried --user --password options:

wget --no-check-certificate --user viroos --password myPassword\

But this downloads only the login page.

What am I doing wrong?

share|improve this question

I think you are very close to the solution. This should work depending on your configuration:

wget --no-check-certificate --user viroos --password myPassword \
     --save-cookies=cookies --keep-session-cookies \

wget --no-check-certificate --load-cookies=cookies \

First call does the authorization on /login url and saves the auth cookie. The second call should get what you want.

This will work if you have basic autohrization enabled on ..../trac/login url.

share|improve this answer

The --user/--password flags in wget, for http URLs, cover HTTP basic authentication. Trac has its own login mechanism, so these flags won't work in this case.

There is a way to do what you want, (although I'm not sure wget is capable of doing it), but before spending time on that direction, did you consider using the TRAC timeline RSS feed?

The RSS feed will allow you to subscribe to the timeline changes, using your favorite RSS reader, and be notified of them. It will also give you a standard XML file for easy parsing, so you'll be able to do what you want with the data.

share|improve this answer
I now about rss time line, in fact I'm trying fetch it (at the end of url I have 50&daysback=90&format=rss). So I will parse XML. I'm doing this because I checking email often then rss reader and because trac authentication doesn't works with google reader so it's little. – Maciek Sawicki Nov 6 '09 at 17:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.