Use case Change admin password
Good news Till now you have to change admin password at multiple location if you are using CQ5.4, see here
From CQ5.5 onward you just have to change admin password once. There are multiple ways though,
1) Using CRX explorer (Old way)
2) Using granite http://host:port/libs/granite/security/content/admin.html#edit:/home/users/a/admin
3) using curl command
curl -u admin:OLD_PWD -F rep:password="NEW_PWD" http://host:port/home/users/a/admin.rw.html
You can also use security API for do user related task, Something like this
curl -d "createUser=true&authorizableId=$userId&rep:password=pw&membership=administrators" -u "admin:admin" http://host:port/libs/granite/security/post/authorizables
(There is set of operation you can do using this, JAVA DOC coming soon)
For any other user other than admin you can use CURL to change password as
curl rep:password="test" --user admin:ADMIN_PASSWORD http://host:port/home/users/a/aparker@geometrixx.com
You still have to use CURL command to change replication agent password mention here
For CQ5.6:
Above curl command does not work for CQ 5.6 instead use this command to change admin password
Note For all cases you need current admin password to perform operation. As always please test it before use.
Thanks Alex from Adobe for Helping.
Good news Till now you have to change admin password at multiple location if you are using CQ5.4, see here
From CQ5.5 onward you just have to change admin password once. There are multiple ways though,
1) Using CRX explorer (Old way)
2) Using granite http://host:port/libs/granite/security/content/admin.html#edit:/home/users/a/admin
3) using curl command
curl -u admin:OLD_PWD -F rep:password="NEW_PWD" http://host:port/home/users/a/admin.rw.html
You can also use security API for do user related task, Something like this
curl -d "createUser=true&authorizableId=$userId&rep:password=pw&membership=administrators" -u "admin:admin" http://host:port/libs/granite/security/post/authorizables
(There is set of operation you can do using this, JAVA DOC coming soon)
For any other user other than admin you can use CURL to change password as
curl rep:password="test" --user admin:ADMIN_PASSWORD http://host:port/home/users/a/aparker@geometrixx.com
You still have to use CURL command to change replication agent password mention here
For CQ5.6:
Above curl command does not work for CQ 5.6 instead use this command to change admin password
curl -u admin:<OLD PASSWORD> -Fplain=<NEW PASSWORD> -Fverify=<NEW PASSWORD> -Fold=<OLD PASSWORD> -FPath=/home/users/a/admin http://HOST:PORT/crx/explorer/ui/setpassword.jsp
BELOW DOES NOT WORK IN CQ5.6 thats why have strike. Looking in to this.
You can also try http://sling.apache.org/documentation/bundles/managing-users-and-groups-jackrabbit-usermanager.html#change-password to change password of a USER. For that you first have to download http://mvnrepository.com/artifact/org.apache.sling/org.apache.sling.jcr.jackrabbit.usermanager/2.2.0 and then install it using felix console or through your code.
BELOW DOES NOT WORK IN CQ5.6 thats why have strike. Looking in to this.
Note For all cases you need current admin password to perform operation. As always please test it before use.
Thanks Alex from Adobe for Helping.
I have incorporated this information and other stuff I've found through experimenting into the change-cq5-passwords script in https://github.com/42Lines/cq5tools which works with both 5.4 and 5.5. Hopefully this script will save others time.
ReplyDeleteJim,
ReplyDeleteThis looks great ... Thanks a lot for sharing ...
Jim do you have something for 5.6 release?
ReplyDeleteHello Jim,
DeleteSame should work for CQ5.6 as well.
Yogesh
it is hanging in this step:
Delete+ curl -s --data rep:password=s3cr3t --user admin:s3cr3t http://localhost:4502/home/users/a/author
+ E=1
+ '[' 1 -ne 0 ']'
thanks
Hello Roque,
DeleteDid you try curl -u admin:OLD_PWD -F rep:password="NEW_PWD" http://host:port/home/users/a/admin.rw.html ?
Yogesh
Great Article. Thank you for sharing! Really an awesome post for every one.
ReplyDeleteIterative Residual Network for Deep Joint Image Demosaicking and Denoising Project For CSE
JigsawNet Shredded Image Reassembly Using Convolutional Neural Network and Loop based Composition Project For CSE
Joint Image Deconvolution and Separation Using Mixed Dictionaries Project For CSE
KalmanFlow 2.0 Efficient Video Optical Flow Estimation via Context Aware Kalman Filtering Project For CSE
K Space Aware Multi Static Millimeter Wave Imaging Project For CSE
Learning to Exploit the Prior Network Knowledge for Weakly Supervised Semantic Segmentation Project For CSE
Low Light Image Enhancement via a Deep Hybrid Network Project For CSE
Monitoring acute stroke progression multi parametric OCT imaging of cortical perfusion, flow, and tissue scattering in a mouse model of permanent focal ischemia Project For CSE
Multi grid phase field skin tumor segmentation in3D ultrasound images Project For CSE
Multi level Features Convolutional Neural Network for Multi focus Image Fusion Project For CSE