My curl command works fine for querying, updating etc. I don't think it is the fault of curl command.
I get the following error message when I tried to change the password of solr-admin, <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>Error 403 Unauthorized request, Response code: 403</title> </head> <body><h2>HTTP ERROR 403</h2> <p>Problem accessing /solr/admin/authentication. Reason: <pre> Unauthorized request, Response code: 403</pre></p> </body> </html> And if I give incorrect username and password, it states bad credentials entered. So, I think the curl command is fine. There is some issue with basic authentication. Okay, One way around is to figure out how to convert my password into a SHA256 (password + salt) and enter it in security.json file. But, I have no idea how to generate the SHA256 equivalent of my password. Any suggestions? On Fri, Aug 2, 2019 at 10:55 AM Zheng Lin Edwin Yeo <edwinye...@gmail.com> wrote: > Hi Salmaan, > > Does your curl command works for other curl commands like normal querying? > Or is it just not working when updating password and adding new users? > > Regards, > Edwin > > > > On Fri, 2 Aug 2019 at 13:03, Salmaan Rashid Syed < > salmaan.ras...@mroads.com> > wrote: > > > Hi Zheng, > > > > I tried and it works. But, when I use the curl command to update password > > or add new users it doesn't work. > > > > I don't know what is going wrong with curl command! > > > > Regards, > > Salmaan > > > > > > On Fri, Aug 2, 2019 at 8:26 AM Zheng Lin Edwin Yeo <edwinye...@gmail.com > > > > wrote: > > > > > Have you tried to access the Solr Admin UI with your created user name > > and > > > password to see if it works? > > > > > > Regards, > > > Edwin > > > > > > On Thu, 1 Aug 2019 at 19:51, Salmaan Rashid Syed < > > > salmaan.ras...@mroads.com> > > > wrote: > > > > > > > Hi Solr User, > > > > > > > > Please help me with my issue. > > > > > > > > I have enabled Solr basic authentication as shown in Solr > > documentations. > > > > > > > > I have changed username from solr to solr-admin as follow > > > > > > > > { > > > > "authentication":{ > > > > "blockUnknown": true, > > > > "class":"solr.BasicAuthPlugin", > > > > > > > > > > > > "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= > > > > Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="} > > > > }, > > > > "authorization":{ > > > > "class":"solr.RuleBasedAuthorizationPlugin", > > > > "permissions":[{"name":"security-edit", > > > > "role":"admin"}], > > > > "user-role":{"solr-admin":"admin"} > > > > }} > > > > > > > > I am able to login to the page using the credentials > > > solr-admin:SolrRocks. > > > > > > > > But, when I try to change the default password using the curl command > > as > > > > follows, > > > > > > > > curl --user solr-admin:SolrRocks > > > > http://localhost:8983/solr/admin/authentication -H > > > > 'Content-type:application/json' -d > > '{"set-user":{"solr-admin":"s2019"}}' > > > > > > > > > > > > I get the following error message, > > > > > > > > > > > > <html> > > > > > > > > <head> > > > > > > > > <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> > > > > > > > > <title>Error 403 Unauthorized request, Response code: 403</title> > > > > > > > > </head> > > > > > > > > <body><h2>HTTP ERROR 403</h2> > > > > > > > > <p>Problem accessing /solr/admin/authentication. Reason: > > > > > > > > <pre> Unauthorized request, Response code: 403</pre></p> > > > > > > > > </body> > > > > > > > > </html> > > > > > > > > > > > > Please help. > > > > > > > > Regards, > > > > Salmaan > > > > > > > > > > > > On Thu, Aug 1, 2019 at 1:51 PM Salmaan Rashid Syed < > > > > salmaan.ras...@mroads.com> wrote: > > > > > > > > > Small correction in the user-name. It is solr-admin everywhere. > > > > > > > > > > Hi Solr Users, > > > > > > > > > > I have enabled Solr basic authentication as shown in Solr > > > documentations. > > > > > > > > > > I have changed username from solr to solr-admin as follow > > > > > > > > > > { > > > > > "authentication":{ > > > > > "blockUnknown": true, > > > > > "class":"solr.BasicAuthPlugin", > > > > > > > > > > > > > > > > "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= > > > > > Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="} > > > > > }, > > > > > "authorization":{ > > > > > "class":"solr.RuleBasedAuthorizationPlugin", > > > > > "permissions":[{"name":"security-edit", > > > > > "role":"admin"}], > > > > > "user-role":{"solr-admin":"admin"} > > > > > }} > > > > > > > > > > I am able to login to the page using the credentials > > > > > mroads-solr-admin:SolrRocks. > > > > > > > > > > But, when I try to change the default password using the curl > command > > > as > > > > > follows, > > > > > > > > > > curl --user solr-admin:SolrRocks > > > > > http://localhost:8983/solr/admin/authentication -H > > > > > 'Content-type:application/json' -d > > > '{"set-user":{"solr-admin":"s2019"}}' > > > > > > > > > > > > > > > > > > > > I get the following error message, > > > > > > > > > > > > > > > <html> > > > > > > > > > > <head> > > > > > > > > > > <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> > > > > > > > > > > <title>Error 403 Unauthorized request, Response code: 403</title> > > > > > > > > > > </head> > > > > > > > > > > <body><h2>HTTP ERROR 403</h2> > > > > > > > > > > <p>Problem accessing /solr/admin/authentication. Reason: > > > > > > > > > > <pre> Unauthorized request, Response code: 403</pre></p> > > > > > > > > > > </body> > > > > > > > > > > </html> > > > > > > > > > > > > > > > Please help. > > > > > > > > > > > > > > > *Thanks and Regards,* > > > > > Salmaan Rashid Syed > > > > > +91 8978353445 | www.panna.ai | > > > > > 5550 Granite Pkwy, Suite #225, Plano TX-75024. > > > > > Cyber Gateways, Hi-tech City, Hyderabad, Telangana, India. > > > > > > > > > > > > > > > > > > > > On Thu, Aug 1, 2019 at 1:48 PM Salmaan Rashid Syed < > > > > > salmaan.ras...@mroads.com> wrote: > > > > > > > > > >> Hi Solr Users, > > > > >> > > > > >> I have enabled Solr basic authentication as shown in Solr > > > > documentations. > > > > >> > > > > >> I have changed username from solr to solr-admin as follow > > > > >> > > > > >> { > > > > >> "authentication":{ > > > > >> "blockUnknown": true, > > > > >> "class":"solr.BasicAuthPlugin", > > > > >> > > > > >> > > > > > > "credentials":{"solr-admin":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= > > > > >> Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="} > > > > >> }, > > > > >> "authorization":{ > > > > >> "class":"solr.RuleBasedAuthorizationPlugin", > > > > >> "permissions":[{"name":"security-edit", > > > > >> "role":"admin"}], > > > > >> "user-role":{"solr-admin":"admin"} > > > > >> }} > > > > >> > > > > >> I am able to login to the page using the credentials > > > > >> mroads-solr-admin:SolrRocks. > > > > >> > > > > >> But, when I try to change the default password using the curl > > command > > > as > > > > >> follows, > > > > >> > > > > >> curl --user mroads-solr-admin:SolrRocks > > > > >> http://localhost:8983/solr/admin/authentication -H > > > > >> 'Content-type:application/json' -d > > > > '{"set-user":{"mroads-solr":"Mroads@2019 > > > > >> #"}}' > > > > >> > > > > >> > > > > >> > > > > >> I get the following error message, > > > > >> > > > > >> > > > > >> <html> > > > > >> > > > > >> <head> > > > > >> > > > > >> <meta http-equiv="Content-Type" > content="text/html;charset=utf-8"/> > > > > >> > > > > >> <title>Error 403 Unauthorized request, Response code: 403</title> > > > > >> > > > > >> </head> > > > > >> > > > > >> <body><h2>HTTP ERROR 403</h2> > > > > >> > > > > >> <p>Problem accessing /solr/admin/authentication. Reason: > > > > >> > > > > >> <pre> Unauthorized request, Response code: 403</pre></p> > > > > >> > > > > >> </body> > > > > >> > > > > >> </html> > > > > >> > > > > >> > > > > >> Please help. > > > > >> > > > > >> > > > > >> > > > > >> *Thanks and Regards,* > > > > >> Salmaan Rashid Syed > > > > >> +91 8978353445 | www.panna.ai | > > > > >> 5550 Granite Pkwy, Suite #225, Plano TX-75024. > > > > >> Cyber Gateways, Hi-tech City, Hyderabad, Telangana, India. > > > > >> > > > > >> > > > > > > > > > > > > > > >