Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8042849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:43:23+00:00 2026-06-05T04:43:23+00:00

I want to login into a website using a shell script and at the

  • 0

I want to login into a website using a shell script and at the same time I want to automatically take the user id and the password also.

Please suggest how is it done using shell script.

Thanks !!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T04:43:25+00:00Added an answer on June 5, 2026 at 4:43 am

    If what you want to do is retrieve content from a website using HTTP Basic authentication then you can achieve this from the command line using wget or curl:

    wget --http-user=user --http-password=password 
    
    curl http://username:password@website.com/url
    

    If cookie-based authentication is used you may be able to use wget for this too, depending on how it is set up. If for example you can HTTP POST to the login page

    wget --save-cookies cookies.txt --post-data \
    'user=myusername&password=mypassword' http://url/loginpage
    
    wget --load-cookies cookies.txt -p http://url/thecontentIwant
    

    The –save-cookies and –load-cookies allow for cookie-based authentication tokens to persist between requests.

    If the form of authentication being used is more complex then the answer is going to be quite different – so it would help to state which website you have in mind. Furthermore, many sites have APIs that you should use instead…

    In general it would help if you could clarify the question a little — I find this bit ‘at the same time I want to automatically take the user id and the password also’ a bit confusing. If you want to do an interactive session in bash (i.e. getting the user to input username and password into the bash script) then you will find

    read -e -p 
    

    very useful (eg. read -e -p “My prompt: ” varname; echo $varname).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want after login user redirects to page creating new table(website), so I have
I want to create login and password fields same as in facebook app for
I want to use apache HttpClient api to login into a website: rfp.ca and
I here want to call another website url, login into it, and use one
I want to integrate facebook login into my web application developed using Spring MVC.
I want to add the remember-me into my login page, by reading here ,
Hi I want to login in twitter account using ios simulator. But when I
I am interested in putting a survey (using survey monkey) into a website. I
I am using asp.net 3.5 with C#. I want to integrate gmail into my
I'm trying to write a script to login to a Drupal website automagically to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.