Configure Active Directory integration
Instructions
Obtain the Active Directory server and a set of credentials to test.
Connect to the Active Directory server using the tools attached to this article.
Find the
baseDn
and the query for users in thisbaseDn
.Fill the
userNamePattern
.
Example
one.erp.security.ldap.cfg
ldapUrl = ldap://172.16.1.2:389
userNamePattern = %1$s@intern.bucuresti-primaria.ro
# Base distinguished name (the root for the search)
baseDn = OU=_PMB,DC=intern,DC=bucuresti-primaria,DC=ro
####everything below should not be changed###
################################
# Security options for binding
################################
# none | simple
securityAuthentication = simple
referral = ignore
################################
# Query
################################
# The query
query = (&(objectCategory=person)(objectClass=user))
################################
# Mapping of users
################################
attributeUserId = SAMAccountName
attributeUserName = cn
################################
# Not currently used attributes
################################
attributeBusinessUnitName =
defaultBusinessUnitName = System
attributeOrganizationName =
defaultOrganizationName = ONE ERP
Query to extract users
ldapsearch -v -H ldap://172.16.1.2 -D 'PMB\one.software' -W -b 'OU=_PMB,DC=intern,DC=bucuresti-primaria,DC=ro' '(&(objectCategory=person)(objectClass=user))' -E pr=10000/noprompt