Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Create System User using Repository Initializer(RepoInit) in AEM as a Cloud service | AEM Community Blog Seeding

Avatar

Administrator

BlogImage.jpg

Create System User using Repository Initializer(RepoInit) in AEM as a Cloud service by Bimmisoi

Abstract

Repo Init is a set of instructions/scripts which help us in creating JCR structures, service users and groups. There are no explicit permissions needed in order to run these scripts. These scripts are executed early in the deployment process so that all required configuration/content exist in the system before the code is executed.

Steps to create system user:

Go to system console config manager and search for Apache Sling Repository Initializer Factory and create a new OSGI config.

Add the below script in scripts and then the system user will be created in your AEM
Note : add any name to your system user and permission as per your needs.
create service user your-systemuser-name
set ACL on /conf, /etc
allow jcr:read for your-systemuser-name
end
Now in order to commit the same, copy the PID and open OSGI Installer Configuration Printer.

Add your PID and select the serialization format and click on print. Copy serialized configuration properties and remove the references.
Create an OSGi config with: org.apache.sling.jcr.repoinit.RepositoryInitializer-project.config and add the copied the content.
Deploy the code and you will get your system user created on your system.

Read Full Blog

Create System User using Repository Initializer(RepoInit) in AEM as a Cloud service

Q&A

Please use this thread to ask the related questions.



Kautuk Sahni
1 Reply