Changing AEM password via curl

Avatar

Avatar

amritvprakash

Avatar

amritvprakash

amritvprakash

09-04-2019

Hi All,

I am facing an issue in changing the password for AEM instance from 6.4.2 and above using the curl command , The password is not getting updated.

curl -s -u admin:admin -X GET “http://localhost:4502/bin/querybuilder.json?path=/home/users&1_property=rep:authorizableId&1_propert... > user.json

USER_PATH=`ruby -rjson -e 'j = JSON.parse(File.read("user.json")); puts j["hits"][0]["path"]'`

curl -s -u admin:admin -Fplain=admin1 -Fverify=admin1  -Fold=admin -FPath=$USER_PATH http://localhost:4502/crx/explorer/ui/setpassword.jsp

This command works fine for AEM 6.4 , but not for 6.4.2 and above. Anyone faced this?

Replies

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

01-05-2019

Are you seeing any messages in the log file. I have never attempted to change password via CURL.

Avatar

Avatar

siddhartha252

Avatar

siddhartha252

siddhartha252

11-09-2019

Hi amritvprakash,

Please try below command which worked for me:

curl -u admin:admin -Fplain=newpassword -Fverify=newpassword -Fold=admin http://hostname:portnum/crx/explorer/ui/setpassword.jsp

Thanks

Sid