コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

What is the best way to register AEM system users with code as configuration?

Avatar

Level 7

For example, I have 1 AEM author and 4 AEM publishers. I need to register a couple of system users for each and every environment. What is the best way to achieve my goal using code as configuration?

 

How would I do this in:
AEM - Cloud as a service
AEM - Adobe Managed Services

 

I am planning to use https://adobe-consulting-services.github.io/acs-aem-commons/features/ensure-service-users/index.html... is this a good practice?

1 受け入れられたソリューション

Avatar

正解者
Level 10

Hi @SupportMember ,

 

RepoInit Scripts is the recommended way to create Service Users in AEMaaCS.

 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/developing/aem...

 

Even in Ensure Service ACS link they are recommending to use the Repo Init Scripts.

 

 

kishorekumar14_0-1632794905239.png

 

 

https://adobe-consulting-services.github.io/acs-aem-commons/features/ensure-service-users/index.html 

元の投稿で解決策を見る

3 返信

Avatar

正解者
Level 10

Hi @SupportMember ,

 

RepoInit Scripts is the recommended way to create Service Users in AEMaaCS.

 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/developing/aem...

 

Even in Ensure Service ACS link they are recommending to use the Repo Init Scripts.

 

 

kishorekumar14_0-1632794905239.png

 

 

https://adobe-consulting-services.github.io/acs-aem-commons/features/ensure-service-users/index.html 

Avatar

Community Advisor

Hi @SupportMember 

 

You can create an OSGi configuration with RepositoryInitializer and it will create appropriate system/service user on any of your AEM instance. This works on both AEM 6.5 and Cloud version as well.

 

To create an OSGi service please follow the below steps:

Create an OSGi service with name like below-

 

/apps/my-app/config.author/org.apache.sling.jcr.repoinit.RepositoryInitializer-author.config

 

Place the script which should contain the service user name along with ACL details.

 

scripts=["
create service user my-data-reader-service

set ACL on /var/my-data
allow jcr:read for my-data-reader-service
end

create path (sling:Folder) /conf/my-app/settings
"]

 

That's it and you are all set!

 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/developing/aem...

 

Thanks!

 

Avatar

Employee Advisor

Hi @SupportMember ,

To create system user please go through the below blogs


AEM - Cloud as a service and AEM 6.5

https://bimmisoi.blogspot.com/2021/08/create-system-user-using-repository.html


AEM - Adobe Managed Services

 

https://bimmisoi.blogspot.com/2020/08/create-system-user-using-runmode-with.html

 

Hope this helps!!!

Thanks