# Problem installing ODKv2 Sync on Ubuntu with Custom LDAP (AD) - yaml: line 98: did not find expected key

**URL:** <https://forum.odk-x.org/t/problem-installing-odkv2-sync-on-ubuntu-with-custom-ldap-ad-yaml-line-98-did-not-find-expected-key/436>\
**Category:** Support\
**Created:** [February 12, 2019, 1:41am UTC](https://forum.odk-x.org/t/problem-installing-odkv2-sync-on-ubuntu-with-custom-ldap-ad-yaml-line-98-did-not-find-expected-key/436 "2019-02-12T01:41:52Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![linl33](https://odkx.b-cdn.net/letter_avatar_proxy/v4/letter/l/b487fb/32.png) [@linl33](https://forum.odk-x.org/u/linl33)\
**Post date:** [February 20, 2019, 4:49pm UTC](https://forum.odk-x.org/t/problem-installing-odkv2-sync-on-ubuntu-with-custom-ldap-ad-yaml-line-98-did-not-find-expected-key/436/3 "2019-02-20T16:49:50Z")

</div>

The reason why AD didn’t work is because these 2 lines were not set properly,

```auto
security.server.ldapDomainDClevel2=
security.server.ldapDomainDClevel1=

```

As an example, if my AD domain is [example.org](http://example.org)

```auto
security.server.ldapDomainDClevel2=example
security.server.ldapDomainDClevel1=org

```

If your domain has more levels, you will need to modify these instead

```auto
security.server.ldapDomain=
security.server.ldapDomainControllerUrl=
security.server.ldapDomainDC=

```

The default value for these 3 fields are configured to infer from `ldapDomainDClevel1` and `ldapDomainDClevel2`.

On the LDAP/AD CA,  
The certificate needs to be importable using [Java `keytool`](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html)

**Edit**  
The Active Directory Domain Controller must have Domain Services enabled. This is required for Sync Endpoint to query the AD using LDAP.

---

_[View the full topic](https://forum.odk-x.org/t/problem-installing-odkv2-sync-on-ubuntu-with-custom-ldap-ad-yaml-line-98-did-not-find-expected-key/436)._
