# SearchGuard Active  Directory Not  able  to   sync user

**URL:** <https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520>\
**Category:** Search Guard\
**Created:** [July 13, 2017, 8:53am UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520 "2017-07-13T08:53:23Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikash\_Singh](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@Vikash\_Singh](https://forum.search-guard.com/u/Vikash_Singh)\
**Post date:** [July 13, 2017, 8:53am UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/1 "2017-07-13T08:53:23Z")

</div>

Hi,

I have followed the Document

[https://github.com/floragunncom/search-guard-docs/blob/master/ldap.md](https://github.com/floragunncom/search-guard-docs/blob/master/ldap.md)

step by step i am using latest ElasticSearch version with latest Search-guard .I have configured sg\_config.yml but when i restarted Elasticsearch it not giving any logs about Active directory connected on not also no any logs i am getting to know what error i having

please find Details here

[searchguard\_demo.log](https://forum.search-guard.com/uploads/short-url/ug95hpy3CA7mE8Od9MizVcwx6wM.log) (117 KB)

[sg\_config.yml](https://forum.search-guard.com/uploads/short-url/sHBpmok4Qx4Ii0wgHGEHYN0KFkI.yml) (9.11 KB)

---

<div class="post-metadata">

**Author:** ![jkressin](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/jkressin/32/9_2.png) [@jkressin](https://forum.search-guard.com/u/jkressin)\
**Post date:** [July 13, 2017, 8:56am UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/2 "2017-07-13T08:56:37Z")

</div>

Seems you did not install the LDAP module:

> **[Search Guard Installation](http://floragunncom.github.io/search-guard-docs/installation.html)**
>
> Step by step instructions for setting up Search Guard on a new or existing Elastcsearch cluster.

> **···**
>
> On Thursday, July 13, 2017 at 10:53:24 AM UTC+2, Vikash Singh wrote:
> 
> > Hi,
> 
> > I have followed the Document
> 
> > 
> 
> > [https://github.com/floragunncom/search-guard-docs/blob/master/ldap.md](https://github.com/floragunncom/search-guard-docs/blob/master/ldap.md)
> 
> > 
> 
> > 
> 
> > step by step i am using latest ElasticSearch version with latest Search-guard .I have configured sg\_config.yml but when i restarted Elasticsearch it not giving any logs about Active directory connected on not also no any logs i am getting to know what error i having
> 
> > 
> 
> > please find Details here
> 
> > 
> 
> > 
> 
> >

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@Vikash\_Singh](https://forum.search-guard.com/u/Vikash_Singh)\
**Post date:** [July 13, 2017, 9:01am UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/3 "2017-07-13T09:01:11Z")

</div>

> > I have put dlic-search-guard-authbackend-ldap-5.0-7-jar-with-dependencies.jar in /usr/share/elasticsearch/plugins/search-guard-5 and re-start Elasticsearch .

I am using 5.5.0 version of elasticsearcg with searchguard version

5.5.0-14 ,please guide me where i was wrong

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@Vikash\_Singh](https://forum.search-guard.com/u/Vikash_Singh)\
**Post date:** [July 13, 2017, 9:25am UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/4 "2017-07-13T09:25:45Z")

</div>

Is this Version Issues?

---

<div class="post-metadata">

**Author:** ![jkressin](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/jkressin/32/9_2.png) [@jkressin](https://forum.search-guard.com/u/jkressin)\
**Post date:** [July 13, 2017, 9:29am UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/5 "2017-07-13T09:29:32Z")

</div>

The LDAP module is either not installed or not configured. If the module is active, you will see a message like this in the logfile during startup:

> **···**
>
> * * *
> 
> Searchguard LDAP is not free software
> 
> for commercial use in production.
> 
> You have to obtain a license if you
> 
> use it in production.
> 
> * * *
> 
> - Check that the jar file is placed correctly and is readable by the ES process.
> 
> - Make sure to update your changed sg\_config via sgadmin
> 
> On Thursday, July 13, 2017 at 11:01:11 AM UTC+2, Vikash Singh wrote:
> 
> > > > I have put dlic-search-guard-authbackend-ldap-5.0-7-jar-with-dependencies.jar in /usr/share/elasticsearch/plugins/search-guard-5 and re-start Elasticsearch .
> 
> > 
> 
> > 
> 
> > I am using 5.5.0 version of elasticsearcg with searchguard version
> 
> > 5.5.0-14 ,please guide me where i was wrong

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@Vikash\_Singh](https://forum.search-guard.com/u/Vikash_Singh)\
**Post date:** [July 13, 2017, 9:49am UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/6 "2017-07-13T09:49:58Z")

</div>

If i remove jar file from Folder i am getting this Error

[2017-07-13T09:47:55,464][ERROR][c.f.s.a.BackendRegistry] Unable to initialize AuthorizationBackend java.lang.ClassNotFoundException: com.floragunn.dlic.auth.ldap.backend.LDAPAuthorizationBackend due to roles\_from\_myldap

[2017-07-13T09:47:55,465][ERROR][c.f.s.a.BackendRegistry] Unable to initialize auth domain java.lang.ClassNotFoundException: com.floragunn.dlic.auth.ldap.backend.LDAPAuthenticationBackend due to ldap

It means Jar file loading by elasticsearch,but wheen i put jar file i cant get any information wheather its connected Ad or not

this is jar version dlic-search-guard-authbackend-ldap-5.0-7-jar-with-dependencies.jar

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@Vikash\_Singh](https://forum.search-guard.com/u/Vikash_Singh)\
**Post date:** [July 13, 2017, 9:52am UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/7 "2017-07-13T09:52:41Z")

</div>

But i am getting this in log file when i restart elasticsearch

### LICENSE NOTICE Search Guard

If you use one or more of the following features in production

make sure you have a valid Search Guard license

(See [https://floragunn.com/searchguard-validate-license](https://floragunn.com/searchguard-validate-license))

- Kibana Multitenancy

- LDAP authentication/authorization

- Active Directory authentication/authorization

- REST Management API

- JSON Web Token (JWT) authentication/authorization

- Kerberos authentication/authorization

- Document- and Fieldlevel Security (DLS/FLS)

- Auditlogging

In case of any doubt mail to [sales@floragunn.com](mailto:sales@floragunn.com)

> **···**
>
> ###################################

---

<div class="post-metadata">

**Author:** ![jkressin](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/jkressin/32/9_2.png) [@jkressin](https://forum.search-guard.com/u/jkressin)\
**Post date:** [July 13, 2017, 10:19am UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/8 "2017-07-13T10:19:53Z")

</div>

Yes, that’s the general licens information we print out. I think the error is due to a misconfiguration in sg\_config.

You have set the “challenge” flag to false in the ldap authentication domain (which comes first with order set to 1), and have set the challenge flag to true for the basic\_internal\_auth\_domain (which comes second with order set to 4).

This means that the LDAP module expects pre-authenticated requests, and will not challenge the user for credentials when they are missing. Thus, the Basic Authentication popup is triggered by the basic\_internal\_auth\_domain, not the LDAP one, means that in your case LDAP is skipped.

If you keep the order of the authenticators as it is now, set the challenge flag to true for LDAP, and set it to false for basic\_internal\_auth\_domain. That should work.

> **···**
>
> On Thursday, July 13, 2017 at 11:52:41 AM UTC+2, Vikash Singh wrote:
> 
> > But i am getting this in log file when i restart elasticsearch
> 
> > ### LICENSE NOTICE Search Guard
> 
> > 
> 
> > If you use one or more of the following features in production
> 
> > make sure you have a valid Search Guard license
> 
> > (See [https://floragunn.com/searchguard-validate-license](https://floragunn.com/searchguard-validate-license))
> 
> > 
> 
> > - Kibana Multitenancy
> 
> > - LDAP authentication/authorization
> 
> > - Active Directory authentication/authorization
> 
> > - REST Management API
> 
> > - JSON Web Token (JWT) authentication/authorization
> 
> > - Kerberos authentication/authorization
> 
> > - Document- and Fieldlevel Security (DLS/FLS)
> 
> > - Auditlogging
> 
> > 
> 
> > In case of any doubt mail to [sales@floragunn.com](mailto:sales@floragunn.com)
> 
> > ###################################
> 
> >

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@Vikash\_Singh](https://forum.search-guard.com/u/Vikash_Singh)\
**Post date:** [July 13, 2017, 10:39am UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/9 "2017-07-13T10:39:36Z")

</div>

> After Changes in sg\_config.yml ,challenge flag to true for ldap and false everywhere in file

then i have followed ./sgadmin\_demo.sh command to update Changes

after that if i see the logs i get nothing related to Active directory.Please guide me how to trace this Error

 ![](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/ae77f586a35c515f4184a7f71dc4baac12c6a67d.png)

---

<div class="post-metadata">

**Author:** ![jkressin](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/jkressin/32/9_2.png) [@jkressin](https://forum.search-guard.com/u/jkressin)\
**Post date:** [July 13, 2017, 10:43am UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/10 "2017-07-13T10:43:08Z")

</div>

If you’re using debs or rpms, then you probably won’t see the license information, since stdout is probably not redirected.  
However, with the changed config, what happens now when you try to login? Also you can set the log level to debug by adding:

logger.fg.name = com.floragunn

logger.fg.level = debug

In log4j2.properties

> **···**
>
> On Thursday, July 13, 2017 at 12:39:37 PM UTC+2, Vikash Singh wrote:
> 
> > > After Changes in sg\_config.yml ,challenge flag to true for ldap and false everywhere in file
> 
> > 
> 
> > then i have followed ./sgadmin\_demo.sh command to update Changes
> 
> > 
> 
> > after that if i see the logs i get nothing related to Active directory.Please guide me how to trace this Error
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> >

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@Vikash\_Singh](https://forum.search-guard.com/u/Vikash_Singh)\
**Post date:** [July 13, 2017, 10:54am UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/11 "2017-07-13T10:54:29Z")

</div>

Sorry, But After enabling searchguard in debug mode also not able to trace anything related with Active Directory,Can you please Confirm that whether we

have tested with Latest version of ElasticSearch and searchguard.

Since i dont even trigger anything related to Active Directory.I am sure Configuration was fine

> **···**
>
> On Thu, Jul 13, 2017 at 4:13 PM, Jochen Kressin [jkressin@floragunn.com](mailto:jkressin@floragunn.com) wrote:
> 
> > If you’re using debs or rpms, then you probably won’t see the license information, since stdout is probably not redirected.  
> > However, with the changed config, what happens now when you try to login? Also you can set the log level to debug by adding:
> 
> > 
> 
> > [logger.fg.name](http://logger.fg.name) = com.floragunn
> 
> > logger.fg.level = debug
> 
> > 
> 
> > In log4j2.properties
> 
> > On Thursday, July 13, 2017 at 12:39:37 PM UTC+2, Vikash Singh wrote:
> > 
> > > > After Changes in sg\_config.yml ,challenge flag to true for ldap and false everywhere in file
> 
> > >
> 
> > > then i have followed ./sgadmin\_demo.sh command to update Changes
> 
> > >
> 
> > > after that if i see the logs i get nothing related to Active directory.Please guide me how to trace this Error
> 
> > >
> 
> > >
> 
> > >
> 
> > >
> 
> > >
> 
> > >
> 
> > –
> > 
> > You received this message because you are subscribed to a topic in the Google Groups “Search Guard” group.
> > 
> > To unsubscribe from this topic, visit [https://groups.google.com/d/topic/search-guard/3kaRbjI5ze4/unsubscribe](https://groups.google.com/d/topic/search-guard/3kaRbjI5ze4/unsubscribe).
> > 
> > To unsubscribe from this group and all its topics, send an email to [search-guard+unsubscribe@googlegroups.com](mailto:search-guard+unsubscribe@googlegroups.com).
> > 
> > To post to this group, send email to [search-guard@googlegroups.com](mailto:search-guard@googlegroups.com).
> > 
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/search-guard/ae5f44ce-b9e4-4b2f-b2f1-07c4d116b5f9%40googlegroups.com](https://groups.google.com/d/msgid/search-guard/ae5f44ce-b9e4-4b2f-b2f1-07c4d116b5f9%40googlegroups.com?utm_medium=email&utm_source=footer).
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> –
> 
> Best Regards
> 
> VikashSingh
> 
> Bizrunttime ITServices

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@Vikash\_Singh](https://forum.search-guard.com/u/Vikash_Singh)\
**Post date:** [July 13, 2017, 10:55am UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/12 "2017-07-13T10:55:38Z")

</div>

Sorry, But After enabling searchguard in debug mode also not able to trace anything related with Active Directory,Can you please Confirm that whether we

have tested with Latest version of ElasticSearch and searchguard.

Since i dont even trigger anything related to Active Directory.I am sure Configuration was fine

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@Vikash\_Singh](https://forum.search-guard.com/u/Vikash_Singh)\
**Post date:** [July 13, 2017, 11:49am UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/13 "2017-07-13T11:49:42Z")

</div>

> I have also triyed with tar Version of elasticsearch elasticsearch-5.5.0 but i am still getting same Error

please guide me how to solve this

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@Vikash\_Singh](https://forum.search-guard.com/u/Vikash_Singh)\
**Post date:** [July 13, 2017, 12:19pm UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/14 "2017-07-13T12:19:10Z")

</div>

How do i know whether Module is installed or not,because if i remove .jar it giving me exception so,please suggest me the IDea how to make Ad integration sucess

---

<div class="post-metadata">

**Author:** ![Vikash\_Singh](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@Vikash\_Singh](https://forum.search-guard.com/u/Vikash_Singh)\
**Post date:** [July 13, 2017, 1:37pm UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/15 "2017-07-13T13:37:04Z")

</div>

now i am getting this message on console

> **···**
>
> * * *
> 
> Searchguard LDAP is not free software
> 
> for commercial use in production.
> 
> You have to obtain a license if you
> 
> use it in production.
> 
> * * *
> 
> But i tested with this \_searchguard/api/configuration/internalusers ,and i cant see our Ad user their
> 
> Can ,you please guide how to View user

---

<div class="post-metadata">

**Author:** ![jkressin](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/jkressin/32/9_2.png) [@jkressin](https://forum.search-guard.com/u/jkressin)\
**Post date:** [July 13, 2017, 7:40pm UTC](https://forum.search-guard.com/t/searchguard-active-directory-not-able-to-sync-user/520/16 "2017-07-13T19:40:13Z")

</div>

Ok, good, that means the module is loaded and the config is picked up. Of course you don’t see LDAP users in the internal user database since these are two completely different things, see also here: [Redirecting to Google Groups](https://groups.google.com/forum/#!topic/search-guard/-Ba7Gz74Iwk)

You don’t see or manage LDAP users in Search Guard directly, and there’s no syncing involved of any kind. The whole point of LDAP is to have one central place to administer users and groups.

> **···**
>
> On Thursday, July 13, 2017 at 3:37:05 PM UTC+2, Vikash Singh wrote:
> 
> > now i am getting this message on console
> 
> > * * *
> 
> > Searchguard LDAP is not free software
> 
> > for commercial use in production.
> 
> > You have to obtain a license if you
> 
> > use it in production.
> 
> > * * *
> 
> > 
> 
> > 
> 
> > But i tested with this \_searchguard/api/configuration/internalusers ,and i cant see our Ad user their
> 
> > 
> 
> > Can ,you please guide how to View user
