Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 am trying to login into this page but I cannot for the life of me get it to work. I have to login to this site when i connect to my school's wifi in order to start a session.

So far ive tried to use bash and cUrl to achieve this but have only achieved to give myself a headache. will cUrl work or am I on the wrong track? Any help is greatly appreciated!



Here's what i tried:

curl --cookie-jar cjar --output /dev/null

curl --cookie cjar --cookie-jar cjar \
    --data 'username=foo' \
    --data 'password=bar' \
    --data 'service=' \
    --data 'loginurl=' \
    --location \
    --output ~/loginresult.html \
share|improve this question
Could you post the code you tried to use to login to that webpage? Also I think bash isn't the way you wanna do this I'm not even sure if there's a way to do this in bash. Sounds like a job for Perl or JavaScript maybe? I'm just starting to learn the basics of programming myself though. – Daniel Sep 4 '12 at 0:34
up vote 4 down vote accepted

Easiest way to bash login:

wget --save-cookies cookies.txt --keep-session-cookies --post-data="username=foo&password=bar" ""

Although some websites may have some restrictions to login like this.

share|improve this answer

You can try this even in Yahoo prompt bash ... you will get a login accepted

curl --user name:password -v 

curl is the way to do it in bash.

share|improve this answer

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.