=====================================
#!/bin/bash
OLD_PWD=admin
NEW_PWD=admin
CONSOLE_PWD=admin
HOST=localhost
PORT=4502
echo changing crx admin password:
curl --data rep:password=$NEW_PWD --user admin:admin http://$HOST:$PORT/home/users/a/admin
echo change cqse admin password:
curl --data username="admin" --data password_old=$OLD_PWD --data password=$NEW_PWD --data password_check=$NEW_PWD --user admin:admin http://$HOST:$PORT/admin/passwd
echo change replication agent password:
curl --data transportPassword=$NEW_PWD --user admin:$OLD_PWD http://$HOST:$PORT/etc/replication/agents.author/publish/jcr:content
echo change sling crx client password:
echo below script does:
echo 1. find specific pid (needs https://github.com/micha/jsawk)
echo 2. set password property for that pid
FACTORY_PID=com.day.crx.sling.client.impl.CRXSlingClientRepository
PID=`curl -s -u admin:$CONSOLE_PWD "http://$HOST:$PORT/system/console/configMgr/(service.factoryPid=$FACTORY_PID).json" | jsawk -n 'out(this.pid)'`
echo ">> $PID"
curl -s -u admin:$CONSOLE_PWD -dapply=true -dadmin.password=$NEW_PWD -dpropertylist=admin.password http://$HOST/system/console/configMgr/$PID > /dev/null
=====================================
Note: Have not tested it. Please test it before use.
Thanks Alexander Klimetschek from Adobe for this information.
curl --data rep:password=$NEW_PWD --user admin:admin http://$HOST:$PORT/home/users/a/admin
ReplyDeletedid not work for me; I instead used:
curl --data plain=$NEW_PWD --data verify=$NEW_PWD --user admin:admin http://$HOST:$PORT/crx/ui/setpassword.jsp | grep 'Password'
I also used Perl instead of jsawk for the client repository password change:
PID=`curl -s -u admin:$CONSOLE_PWD "http://$HOST:$PORT/system/console/configMgr/(service.factoryPid=$FACTORY_PID).json" | perl -ne 'use JSON; $j = decode_json $_; print %{$j->[0]}->{"pid"}'`
Thanks Jim for your feed back. It would be handled much better in next release by single CURL command. Will update this post as soon as it is released.
DeleteHi I tried to change the replication agent password for cq5.6 and it didnt work with the command posted:
ReplyDeletecurl --data transportPassword=$NEW_PWD --user admin:$OLD_PWD http://$HOST:$PORT/etc/replication/agents.author/publish/jcr:content
regards.
Please make sure that it is the default agent you are using. If it is not default agent path could be different.
DeleteAlso what version of CQ are you using ?
Thank you very much for this article.
ReplyDeleteMovers and Packers in Pune
Movers and Packers in Gurgaon
Movers and Packers in Bangalore
I am glad that I saw this post. It is informative blog for us and we need this type of blog thanks for share this blog, Keep posting such instructional blogs and I am looking forward for your future posts.
DeleteCyber Security Projects for Final Year
JavaScript Training in Chennai
Project Centers in Chennai
JavaScript Training in Chennai
Thank you very much for this article
ReplyDeletePackers and Movers Mumbai
Packers and Movers Navi Mumbai
Packers and Movers Thane
Packers and Movers Ghaziabad
Packers and Movers Faridabad
Packers and Movers Delhi
Packers and Movers Noida
This software has been designed to work in a special way to help reset the password of your system in the simplest way possible.reset windows 10 password
ReplyDelete