In some developments for drupal 7, I need connect with one user via a bash script then get the content of the connected homepage.
After several searches, my last try :
URL="https://www.mainsite.com/subsiteone/"
curl -s -f -o $output -H "Content-Type:application/xml" --insecure $URL -w "@formatsender.conf" > ./test.txt
formid=$( grep 'input type="hidden" name="form_build_id"' $output | cut -d"=" -f4 | sed -e 's/"//g' | sed -e 's/\/>//g' )
echo $formid #show the good pofm id
curl --request POST ${URL} --data "name=usernameone%26pass=userpasswordone%26form_build_id=$formid%26form_id=user_login"
the last curl shows the content of the login page (not connected) without any error message. I don't understand where is my mistake..