How to reset the admin password in AEM 6.3

Learn how to reset the admin password in AEM 6.3. You must stop AEM first.

Description description


Adobe Experience Manager 6.4, 6.5


The admin password is forgotten and needs to be reset.

Resolution resolution

Follow these steps to reset the password:

  1. Enter the following command in the server command prompt (replace the path with the path to your AEM segmentstore). AEM should be stopped before running these steps: java -jar oak-run-*.jar console path/to/crx-quickstart/repository/segmentstore --read-write ":load admin-reset.groovy"
  2. Enter the following: :load admin-reset63.groovy
  3. Press enter, and the script will automatically find and change the admin password to admin.
  4. Review the output, it says: Found admin node : SegmentNodeBuilder{path=/home/users/some/path}
  5. Start AEM.

Additional information

Needed Items:

  • oak-run jar
  • admin-reset.groovy script (download/remove .txt or create from content)


Get file



import org.apache.jackrabbit.oak.spi.commit.CommitInfo

import org.apache.jackrabbit.oak.spi.commit.EmptyHook

class Global {

     static adminNode =  null ;


void findAdminNode(ub) {

     if (ub.hasProperty( "rep:principalName" )) {

         if ( "rep:principalName = admin" .equals(ub.getProperty( "rep:principalName" ).toString())) {

             Global.adminNode = ub;



     ub.childNodeNames.each { it ->

         if (Global.adminNode ==  null ) {





ub =;

findAdminNode(ub.getChildNode( "home" ).getChildNode( "users" ));

if (Global.adminNode) {

     println( "Found admin node: " + Global.adminNode.toString());

     Global.adminNode.setProperty( "rep:password" , PasswordUtil.buildPasswordHash( "admin" ));, EmptyHook.INSTANCE, CommitInfo.EMPTY);

else {

     println( "Could not find admin node." );