LoginService method in AEM 6.2 | Community
Skip to main content
Level 4
March 18, 2017
Solved

LoginService method in AEM 6.2

  • March 18, 2017
  • 5 replies
  • 2259 views

Hi,

As .loginAdministrative(null) is deprecated in CQ 5.5 and in AEM  6.2 loginService(String,String) method is used.

As in 5.5 there is no need to create service user and .loginAdministrative(null) was used,

And in AEM 6.2 ,

For creating group and users , it is necessary that only service user can do following operation i.e creating group and users in crx repository?

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 Ratna_Kumar

Hi,

Yes you can create users and groups pragramatically but you cannot create system user pragramatically.

See this thread: http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__dzfw-hi_is_it_possibl.htmlCreate system user via AEM GUI - http://www.aemcq5tutorials.com/tutorials/create-system-user-in-aem/

And yes you are right, for creating users and groups, service user is required since, loginAdministrative(null) is deprecated.

See this below thread for how to create users and groups programitically using service user::

//http://stackoverflow.com/questions/38661668/how-to-create-user-and-group-in-aem6-2-programattically-with-acl-permissions

Hope this helps!!

~ Ratna.

5 replies

Ratna_Kumar
Level 10
March 21, 2017

Hi Umesh,

You can create groups and users using useradmin console. System user not at all required to create groups and users in repository.

//Why system user was introduced in AEM 6.x versions:

Use of admin session and admin resource resolver through ResourceresolverFactory is now deprecated, that’s why from AEM 6.1 Adobe forces developers to create system users and map them to Service User Mapper in Felix Console. 

  • Prevent excessive use of administrative JCR Sessions and ResourceResolvers.
  • Allow services access to ResourceResolvers and JCR Sessions without requiring to hard-code or configure passwords.
  • Allow services to use service users and/or system user which are specially configured for service level access.

For more information on this system user topic see the below link:

//http://www.aemcq5tutorials.com/tutorials/create-system-user-in-aem/

Hope this helps!!

~Ratna.

Level 4
March 21, 2017

Thanks , I agree with your point.

But,

I have to create a users and groups programatically that is in osgi-bundle , I think for it service user are  required, doesn't it?

Also, Can i create system user programatically?

 

Thanks

Ratna_Kumar
Ratna_KumarAccepted solution
Level 10
March 21, 2017

Hi,

Yes you can create users and groups pragramatically but you cannot create system user pragramatically.

See this thread: http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__dzfw-hi_is_it_possibl.htmlCreate system user via AEM GUI - http://www.aemcq5tutorials.com/tutorials/create-system-user-in-aem/

And yes you are right, for creating users and groups, service user is required since, loginAdministrative(null) is deprecated.

See this below thread for how to create users and groups programitically using service user::

//http://stackoverflow.com/questions/38661668/how-to-create-user-and-group-in-aem6-2-programattically-with-acl-permissions

Hope this helps!!

~ Ratna.

Level 4
March 21, 2017

Thanks..

In AEM 6.2, I am able to use loginAdministrative(null) method but not in AEM 6.3.

we can still use this method in 6.2 but not in 6.3? is this correct?

Ratna_Kumar
Level 10
March 21, 2017

Hi,

Yes, you can still use loginAdministrative(null) method in AEM 6.2 even it is deprecated.

I am not sure about AEM6.3 because, it is yet to release in April, 2017.

~ Ratna.