curl command not working from jump server after admin password change

surendarm613658

19-06-2020

 Hi,

 

I have changed the admin password across "publishers/authors" and after changing the password if i run the below curl command on Jump server to check the bundles count, i am getting below error but if i login to the corresponding publisher, i am getting successful output. Something got changed after admin password change. Can someone please check & assist?

 

Note: From Jumpserver, curl was giving proper output before admin password change.

 

Error on jump server

[root@jumpserver]# /usr/local/bin/dsh -m publish09 "curl -u 'admin':'admin$@20tY' http://localhost:41000/system/console/bundles/.json | cut -d':' -f2,3"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
118 355 118 355 0 0 5325 0 --:--:-- --:--:-- --:--:-- 5546
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 </title>
</head>
<body>
500</h2>
<pre> org.apache.sling.api.auth.NoAuthenticationHandlerException</pre></p>
//</small></i>
</body>
</html>

 

Curl check inside publisher: Working Output

[root@publish09]# curl -u 'admin':'admin$@20tY' http://localhost:41000/system/console/bundles/.json | cut -d':' -f2,3
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 93860 0 93860 0 0 1784k 0 --:--:-- --:--:-- --:--:-- 1870k
"Bundle information: 497 bundles in total - all 497 bundles active.","s"

Accepted Solutions (1)

Accepted Solutions (1)

Vaibhavi

MVP

19-06-2020

Hi @surendarm613658 

 

Looks like issue is due to the special characters in curl command. 

Curl doesn't encode the special character by default. In your scenario I can see the specialist chars @$ in password. 

You can use --data-urlencode  in curl to escape special  character. 

 

You can check the below article. 

https://stackoverflow.com/questions/10060093/special-characters-like-and-in-curl-post-data

 

Answers (0)