Change ADMIN password in AEM6.1 | Community
Skip to main content
Jai1122
Level 4
May 3, 2016
Solved

Change ADMIN password in AEM6.1

  • May 3, 2016
  • 5 replies
  • 14418 views

Hi All,

  I am trying to change the default admin password. I referred to the kb article but that refers to old versions of cq. 

As per adobe docs  

1)The AEM admin account needs to be changed

2)The admin password for the OSGi Web console needs to be changed

For step1 when i try to click the change password link the corresponding dialog is not opening up.

Can someone please help me on this?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

Option 1:-

Go to "http://localhost:4502/projects.html"

Tools-> operations->Security->Users find "admin" User -> click it-> Under Account Settings there is option for Change Password.

 

Option 2:- CRX Explorer

Go to "http://localhost:4502/crx/explorer/index.jsp"

User Administration-> Find Admin user-> Change Password

 

Option 3:- ConfigMGr

Go to :- http://localhost:4502/system/console/configMgr

Configure "Apache Felix OSGI Management Console" -> Change password -> Save

 

Option 4:- Curl

Link:- http://labs.6dglobal.com/blog/2015-06-03/changing-user-passwords-aem-61-curl/

First, we'll call the Query Builder via cURL to get the path to the user:

curl -s -u admin:admin -X GET "http://localhost:4502/bin/querybuilder.json?path=/home/users&1_property=rep:authorizableId&1_property.value={USER_NAME}&p.limit=-1" > user.json
Next, we read the path from the JSON result:

USER_PATH=`ruby -rjson -e 'j = JSON.parse(File.read("user.json")); puts j["hits"][0]["path"]'`
Finally, the USER_PATH variable can be used to set the user's password:

curl -s -u admin:admin -Fplain={NEW_PASSWORD} -Fverify={NEW_PASSWORD}  -Fold={OLD_PASSWORD} -FPath=$USER_PATH http://localhost:4502/crx/explorer/ui/setpassword.jsp
Putting it all together, if I wanted to change the admin user's password I would call:

curl -s -u admin:admin -X GET "http://localhost:4502/bin/querybuilder.json?path=/home/users&1_property=rep:authorizableId&1_property.value=admin&p.limit=-1" > 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

 

I hope this would be helpful to you.

Thanks and Regards

Kautuk Sahni

5 replies

mkumar
Level 3
May 3, 2016

Hi Jaypal,

I am able to change admin password in AEM 6.1.

Can u check if u have any errors in console and also monitor the error logs in crx/de  upon clicking the change password link.

lokeshb93001514
May 3, 2016

Changing the password of Admin user. Refer [1]

[1] https://docs.adobe.com/docs/en/aem/6-1/administer/security/granite-user-group-admin.html#Changing the Password for an Existing User

For changing the Felix console pwd,

1. Goto /system/console/configMgr

2. Search for  'Apache Felix OSGi Management Console' and Click on it.

3. Change the password attribute and save.

 

Hope this helps !

Tuhin_Ghosh
Level 8
May 3, 2016

Hi Jai,

 

The replies posted for this question should solve your problem. Please try the same and mark this as solved, otherwise let the community know what problem you are facing after while trying.

Try to capture the error log,

Thanks

Tuhin

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
May 4, 2016

Option 1:-

Go to "http://localhost:4502/projects.html"

Tools-> operations->Security->Users find "admin" User -> click it-> Under Account Settings there is option for Change Password.

 

Option 2:- CRX Explorer

Go to "http://localhost:4502/crx/explorer/index.jsp"

User Administration-> Find Admin user-> Change Password

 

Option 3:- ConfigMGr

Go to :- http://localhost:4502/system/console/configMgr

Configure "Apache Felix OSGI Management Console" -> Change password -> Save

 

Option 4:- Curl

Link:- http://labs.6dglobal.com/blog/2015-06-03/changing-user-passwords-aem-61-curl/

First, we'll call the Query Builder via cURL to get the path to the user:

curl -s -u admin:admin -X GET "http://localhost:4502/bin/querybuilder.json?path=/home/users&1_property=rep:authorizableId&1_property.value={USER_NAME}&p.limit=-1" > user.json
Next, we read the path from the JSON result:

USER_PATH=`ruby -rjson -e 'j = JSON.parse(File.read("user.json")); puts j["hits"][0]["path"]'`
Finally, the USER_PATH variable can be used to set the user's password:

curl -s -u admin:admin -Fplain={NEW_PASSWORD} -Fverify={NEW_PASSWORD}  -Fold={OLD_PASSWORD} -FPath=$USER_PATH http://localhost:4502/crx/explorer/ui/setpassword.jsp
Putting it all together, if I wanted to change the admin user's password I would call:

curl -s -u admin:admin -X GET "http://localhost:4502/bin/querybuilder.json?path=/home/users&1_property=rep:authorizableId&1_property.value=admin&p.limit=-1" > 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

 

I hope this would be helpful to you.

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
November 13, 2023

Hi @kautuk_sahni ,

 

Is it mandatory to update the admin password for the OSGi Web console if we use the Option 4:- Curl ? 

Or the curl does automatically the password update in the OSGi Web console ?

 

Thanks for the clarification,

Best regards,

Joseph

 

dan_klco
Level 4
February 22, 2018

FYI - since labs.6dglobal.com is down, here's a link to the post about changing password via curl on my personal blog: https://www.danklco.com/posts/2015/06/03/changing-user-passwords-aem-61-curl/