Is it possible to pass admin password while installing aem instance through terminal ? | Community
Skip to main content
MayurSatav
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 24, 2022
Solved

Is it possible to pass admin password while installing aem instance through terminal ?

  • November 24, 2022
  • 2 replies
  • 1214 views

Hi,

 

When we install AEM instance through terminal with the help of  java -jar aem-author-p4502.jar commandit asked for admin password as shown in below screenshot

I am working on one automation and wanted to know is there any way to pass this password along with java -jar aem-author-p4502.jar command. So that we don't have to enter it later? It will directly take it from argument we passed with command.

 

Thanks

 

 

 

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 SantoshSai

Hi @mayursatav ,

Yes, that's possible using the -nointeractive Flag.

  • Upon running the instance from the command line, you will be presented with the option to change the admin password during the installation process:

  • You can also choose to specify the password from a properties file. This is done by using the -nointeractive flag combined with the -Dadmin.password.file system property.

    Below is an example:

    java -Dadmin.password.file =/path/to/passwordfile.properties -jar aem6.3.jar -nointeractive
    

    The password inside the passwordfile.properties file needs to have the below format:

    admin.password = 12345678
    
    NOTE:

    If you simply use the -nointeractive parameter without the -Dadmin.password.file system property, AEM will use the default admin password without asking you to change it, essentially replicating behaviour from earlier versions. This non interactive mode can be used for automated installations using the command line in an installation script.

    For more details please refer: https://experienceleague.adobe.com/docs/experience-manager-64/administering/security/security-config...

Hope that helps!

Regards,
Santosh

2 replies

Adobe Employee
November 24, 2022

hi @mayursatav , Currently there are not any parameters which you can provide to pass username and password using command prompt

 

Set up Local AEM Runtime for AEM as a Cloud Service Development | Adobe Experience Manager

SantoshSai
Community Advisor
SantoshSaiCommunity AdvisorAccepted solution
Community Advisor
November 24, 2022

Hi @mayursatav ,

Yes, that's possible using the -nointeractive Flag.

  • Upon running the instance from the command line, you will be presented with the option to change the admin password during the installation process:

  • You can also choose to specify the password from a properties file. This is done by using the -nointeractive flag combined with the -Dadmin.password.file system property.

    Below is an example:

    java -Dadmin.password.file =/path/to/passwordfile.properties -jar aem6.3.jar -nointeractive
    

    The password inside the passwordfile.properties file needs to have the below format:

    admin.password = 12345678
    
    NOTE:

    If you simply use the -nointeractive parameter without the -Dadmin.password.file system property, AEM will use the default admin password without asking you to change it, essentially replicating behaviour from earlier versions. This non interactive mode can be used for automated installations using the command line in an installation script.

    For more details please refer: https://experienceleague.adobe.com/docs/experience-manager-64/administering/security/security-config...

Hope that helps!

Regards,
Santosh

Santosh Sai
MayurSatav
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 24, 2022

Thanks @santoshsai , This is exactly what i was looking for.

Mayur Satav | www.mayursatav.in