<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=LdapSiteConfigSettings</id>
	<title>LdapSiteConfigSettings - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=LdapSiteConfigSettings"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=LdapSiteConfigSettings&amp;action=history"/>
	<updated>2026-08-22T06:31:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=LdapSiteConfigSettings&amp;diff=1806&amp;oldid=prev</id>
		<title>Admin: 3 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=LdapSiteConfigSettings&amp;diff=1806&amp;oldid=prev"/>
		<updated>2016-04-06T20:14:17Z</updated>

		<summary type="html">&lt;p&gt;3 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Outdated}}&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
&lt;br /&gt;
This code is part of the [http://wiki.bestpractical.com/view/LDAP LDAP integration overlay]; you&amp;#039;ll also need [[LdapUserLocalOverlay]] and, optionally, [[LdapAutocreateAuthCallback]].&lt;br /&gt;
&lt;br /&gt;
= Configuration =&lt;br /&gt;
&lt;br /&gt;
Put these in your site configuration file, [=${RTHOME}/etc/[[RT SiteConfig|RT_SiteConfig]].pm]&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;### What auth methods do you like and in what order?&lt;br /&gt;
  &lt;br /&gt;
  Set($AuthMethods, [&amp;#039;LDAP&amp;#039;, &amp;#039;Internal&amp;#039;]);&lt;br /&gt;
  &lt;br /&gt;
  ### LDAP Settings&lt;br /&gt;
  #&lt;br /&gt;
  # There are two different branches of this: LdapAuth* and LdapInfo*;&lt;br /&gt;
  # additionally, most of the old Ldap* variables are honored, too.&lt;br /&gt;
  #&lt;br /&gt;
  # This means if you only have one LDAP server/config you can just set&lt;br /&gt;
  # &amp;quot;LdapServer&amp;quot;, &amp;quot;LdapUser&amp;quot;, etc. and they will be used for both&lt;br /&gt;
  # authentication and information&lt;br /&gt;
  &lt;br /&gt;
  ### Enable/Disable LDAP services&lt;br /&gt;
  Set($LdapExternalAuth, 1);&lt;br /&gt;
  Set($LdapExternalInfo, 1);&lt;br /&gt;
  &lt;br /&gt;
  ### Common Settings: affecting both auth and info services&lt;br /&gt;
  &lt;br /&gt;
  # Should we create accounts for users who aren&amp;#039;t in LDAP?&lt;br /&gt;
  Set($LdapAutoCreateNonLdapUsers, 1);&lt;br /&gt;
  &lt;br /&gt;
  # Map RT attributes to LDAP attributes&lt;br /&gt;
  #&lt;br /&gt;
  ### THE MAPPING BELOW WILL NOT WORK FOR YOU UNLESS YOU CHANGE&lt;br /&gt;
  ### IT TO MATCH YOUR LDAP SCHEMA! See http://wiki.bestpractical.com/view/LdapAttrMap&lt;br /&gt;
  ### to learn how to set this variable properly for either LDAP or Windows&lt;br /&gt;
  ### Active Directory.&lt;br /&gt;
  Set($LdapAttrMap, {&amp;#039;Name&amp;#039; =&amp;amp;gt; &amp;#039;uid&amp;#039;,&lt;br /&gt;
                     &amp;#039;EmailAddress&amp;#039; =&amp;amp;gt; &amp;#039;mail&amp;#039;,&lt;br /&gt;
                     &amp;#039;Organization&amp;#039; =&amp;amp;gt; &amp;#039;o&amp;#039;,&lt;br /&gt;
                     &amp;#039;RealName&amp;#039; =&amp;amp;gt; &amp;#039;cn&amp;#039;,&lt;br /&gt;
                     &amp;#039;ExternalContactInfoId&amp;#039; =&amp;amp;gt; &amp;#039;dn&amp;#039;,&lt;br /&gt;
                     &amp;#039;ExternalAuthId&amp;#039; =&amp;amp;gt; &amp;#039;uid&amp;#039;,&lt;br /&gt;
                     &amp;#039;Gecos&amp;#039; =&amp;amp;gt; &amp;#039;uid&amp;#039;,&lt;br /&gt;
                     &amp;#039;WorkPhone&amp;#039; =&amp;amp;gt; &amp;#039;telephoneNumber&amp;#039;,&lt;br /&gt;
                     &amp;#039;Address1&amp;#039; =&amp;amp;gt; &amp;#039;ou&amp;#039;,&lt;br /&gt;
                     &amp;#039;Address2&amp;#039; =&amp;amp;gt; &amp;#039;physicalDeliveryOfficeName&amp;#039;}&lt;br /&gt;
  );&lt;br /&gt;
  &lt;br /&gt;
  # A list of RT attrs which can uniquely identify a user,&lt;br /&gt;
  # ordered from most to least preferred.&lt;br /&gt;
  Set($LdapRTAttrMatchList, [&amp;#039;ExternalContactInfoId&amp;#039;, &amp;#039;Name&amp;#039;,&lt;br /&gt;
                             &amp;#039;EmailAddress&amp;#039;, &amp;#039;RealName&amp;#039;,&lt;br /&gt;
                             &amp;#039;WorkPhone&amp;#039;, &amp;#039;Address2&amp;#039;]&lt;br /&gt;
  );&lt;br /&gt;
  &lt;br /&gt;
  # A list of LDAP attrs to examine when canonicalizing email addresses,&lt;br /&gt;
  # ordered from most to least preferred&lt;br /&gt;
  Set($LdapEmailAttrMatchList, [&amp;#039;mail&amp;#039;, &amp;#039;mailRoutingAddress&amp;#039;,&lt;br /&gt;
                                &amp;#039;mailAlternateAddress&amp;#039;]&lt;br /&gt;
  );&lt;br /&gt;
  &lt;br /&gt;
  # A list of prefixes to apply to email address matches.&lt;br /&gt;
  # Windows 2003 AD uses prefixes or smtp: or SMTP:.&lt;br /&gt;
  # If not required just leave &amp;#039;&amp;#039;&lt;br /&gt;
  Set($LdapEmailAttrMatchPrefix, [&amp;#039;&amp;#039;, &amp;#039;smtp:&amp;#039;, &amp;#039;SMTP:&amp;#039;] );&lt;br /&gt;
  &lt;br /&gt;
  # The basics; if set, these override $RT::LdapAuth* and $RT::LdapInfo*&lt;br /&gt;
  Set($LdapServer, &amp;#039;ldap.example.com&amp;#039;);&lt;br /&gt;
  Set($LdapBase, &amp;#039;ou=People,dc=example,dc=com&amp;#039;);&lt;br /&gt;
  Set($LdapFilter, &amp;#039;(objectclass=posixAccount)&amp;#039;);&lt;br /&gt;
  #   Windows 2003 Active Directory does not allow anonymous LDAP binding&lt;br /&gt;
  #   thus you must pass Net::LDAP a username and password that has&lt;br /&gt;
  #   access to read the directory.&lt;br /&gt;
  #&lt;br /&gt;
  #   You may also need to specify the full distinguished name instead of&lt;br /&gt;
  #   just a username for LdapUser below.&lt;br /&gt;
  #   e.g. cn=Username,cn=Users,dc=yourdomain,dc=com&lt;br /&gt;
  #&lt;br /&gt;
  #Set($LdapUser, &amp;#039;&amp;#039;);&lt;br /&gt;
  #Set($LdapPass, &amp;#039;&amp;#039;);&lt;br /&gt;
  &lt;br /&gt;
  # This filter is used by RT::User::UpdateFromLdap to test whether an&lt;br /&gt;
  # LDAP user&amp;#039;s RT account should be disabled. Any user whose LDAP record&lt;br /&gt;
  # passes this filter (returns true) will be disabled at login&lt;br /&gt;
  Set($LdapDisableFilter, &amp;#039;(employmentStatus=Terminated)&amp;#039;);&lt;br /&gt;
  &lt;br /&gt;
  # If you set these, only members of this group can auth via LDAP&lt;br /&gt;
  #Set($LdapGroup, &amp;#039;cn=RT,ou=Group,dc=example,dc=com&amp;#039;);&lt;br /&gt;
  #Set($LdapGroupAttr, &amp;#039;uniqueMember&amp;#039;);&lt;br /&gt;
  &lt;br /&gt;
  # These turn on SSL for LDAP&lt;br /&gt;
  #Set($LdapTLS, 0);&lt;br /&gt;
  #Set($LdapSSLVersion, 3);&lt;br /&gt;
  &lt;br /&gt;
  ### IF YOU USE THE SAME LDAP SERVER FOR AUTH AND INFO STOP HERE ###&lt;br /&gt;
  &lt;br /&gt;
  ### Authentication settings&lt;br /&gt;
  &lt;br /&gt;
  #&lt;br /&gt;
  # These are used only if their $RT::Ldap* analogs are not set;&lt;br /&gt;
  # if you want one of these variables to be honored, you must comment&lt;br /&gt;
  # out the corresponding $RT::Ldap* variable above&lt;br /&gt;
  &lt;br /&gt;
  #Set($LdapAuthServer, &amp;#039;ldap.example.com&amp;#039;);&lt;br /&gt;
  #Set($LdapAuthBase, &amp;#039;ou=People,dc=example,dc=com&amp;#039;);&lt;br /&gt;
  #Set($LdapAuthFilter, &amp;quot;(objectclass=posixAccount)&amp;quot;);&lt;br /&gt;
  #Set($LdapAuthUser, &amp;#039;&amp;#039;);&lt;br /&gt;
  #Set($LdapAuthPass, &amp;#039;&amp;#039;);&lt;br /&gt;
  &lt;br /&gt;
  # This filter is used by RT::User::UpdateFromLdap to test whether an&lt;br /&gt;
  # LDAP user&amp;#039;s RT account should be disabled. Any user whose LDAP record&lt;br /&gt;
  # passes this filter (returns true) will be disabled at login&lt;br /&gt;
  # Set($LdapAuthDisableFilter, &amp;#039;(employmentStatus=Terminated)&amp;#039;);&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  # If you set these, only members of this group can auth via LDAP&lt;br /&gt;
  #Set($LdapAuthGroup, &amp;#039;cn=RT,ou=Group,dc=example,dc=com&amp;#039;);&lt;br /&gt;
  #Set($LdapAuthGroupAttr, &amp;#039;uniqueMember&amp;#039;);&lt;br /&gt;
  # These turn on SSL for LDAP&lt;br /&gt;
  #Set($LdapAuthTLS, 0);&lt;br /&gt;
  #Set($LdapAuthSSLVersion, 3);&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  ### Information settings&lt;br /&gt;
  &lt;br /&gt;
  #&lt;br /&gt;
  # These are used only if their $RT::Ldap* analogs are not set;&lt;br /&gt;
  # if you want one of these variables to be honored, you must comment&lt;br /&gt;
  # out the corresponding $RT::Ldap* variable above&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  #Set($LdapInfoServer, &amp;#039;ldap.example.com&amp;#039;);&lt;br /&gt;
  #Set($LdapInfoBase, &amp;#039;ou=People,dc=example,dc=com&amp;#039;);&lt;br /&gt;
  #Set($LdapInfoFilter, &amp;quot;(objectclass=posixAccount)&amp;quot;);&lt;br /&gt;
  #Set($LdapInfoUser, &amp;#039;&amp;#039;);&lt;br /&gt;
  #Set($LdapInfoPass, &amp;#039;&amp;#039;);&lt;br /&gt;
  &lt;br /&gt;
  # This filter is used by RT::User::UpdateFromLdap to test whether an&lt;br /&gt;
  # LDAP user&amp;#039;s RT account should be disabled. Any user whose LDAP record&lt;br /&gt;
  # passes this filter (returns true) will be disabled at login&lt;br /&gt;
  # Set($LdapInfoDisableFilter, &amp;#039;(employmentStatus=Terminated)&amp;#039;);&lt;br /&gt;
  &lt;br /&gt;
  # These turn on SSL for LDAP&lt;br /&gt;
  #Set($LdapInfoTLS, 0);&lt;br /&gt;
  #Set($LdapInfoSSLVersion, 3);&lt;br /&gt;
  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Configuration for Zimbra Collaboration Suite =&lt;br /&gt;
&lt;br /&gt;
* The following settings work for Zimbra 4.5.6&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Set($AuthMethods, [&amp;#039;LDAP&amp;#039;, &amp;#039;Internal&amp;#039;]);&lt;br /&gt;
  Set($LdapExternalAuth, 1);&lt;br /&gt;
  Set($LdapExternalInfo, 1);&lt;br /&gt;
  Set($LdapAutoCreateNonLdapUsers, 0);&lt;br /&gt;
  Set($LdapAttrMap, {&amp;#039;Name&amp;#039; =&amp;amp;gt; &amp;#039;uid&amp;#039;,&lt;br /&gt;
                    &amp;#039;EmailAddress&amp;#039; =&amp;amp;gt; &amp;#039;mail&amp;#039;,&lt;br /&gt;
                    &amp;#039;Organization&amp;#039; =&amp;amp;gt; &amp;#039;ou&amp;#039;,&lt;br /&gt;
                    &amp;#039;RealName&amp;#039; =&amp;amp;gt; &amp;#039;cn&amp;#039;,&lt;br /&gt;
                    &amp;#039;ExternalContactInfoId&amp;#039; =&amp;amp;gt; &amp;#039;dn&amp;#039;,&lt;br /&gt;
                    &amp;#039;ExternalAuthId&amp;#039; =&amp;amp;gt; &amp;#039;uid&amp;#039;,&lt;br /&gt;
                    &amp;#039;WorkPhone&amp;#039; =&amp;amp;gt; &amp;#039;telephoneNumber&amp;#039;,&lt;br /&gt;
                    &amp;#039;Signature&amp;#039; =&amp;amp;gt; &amp;#039;zimbraPrefMailSignature&amp;#039;}&lt;br /&gt;
  );&lt;br /&gt;
  Set($LdapRTAttrMatchList, [&amp;#039;ExternalContactInfoId&amp;#039;, &amp;#039;Name&amp;#039;,&lt;br /&gt;
                            &amp;#039;EmailAddress&amp;#039;, &amp;#039;RealName&amp;#039;,&lt;br /&gt;
                            &amp;#039;WorkPhone&amp;#039;, &amp;#039;Address2&amp;#039;]&lt;br /&gt;
  );&lt;br /&gt;
  Set($LdapEmailAttrMatchList, [&amp;#039;mail&amp;#039;, &amp;#039;zimbraMailAlias&amp;#039;]);&lt;br /&gt;
  Set($LdapEmailAttrMatchPrefix, [&amp;#039;&amp;#039;, &amp;#039;smtp:&amp;#039;, &amp;#039;SMTP:&amp;#039;] );&lt;br /&gt;
  Set($LdapServer, &amp;#039;ldap.example.com&amp;#039;);&lt;br /&gt;
  Set($LdapBase, &amp;#039;ou=people,dc=example,dc=com&amp;#039;);&lt;br /&gt;
  Set($LdapFilter, &amp;#039;(objectclass=organizationalPerson)&amp;#039;);&lt;br /&gt;
  Set($LdapDisableFilter, &amp;#039;(zimbraMailStatus=disabled)&amp;#039;);&lt;br /&gt;
  Set($LdapTLS, 1);&lt;br /&gt;
  Set($LdapSSLVersion, 3);&lt;br /&gt;
  &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Active Directory LDAPS =&lt;br /&gt;
&lt;br /&gt;
The following lines need to be added to switch LDAP over from regular port 389 LDAP traffic to using SSL-encrypted LDAPS on port 636:&lt;br /&gt;
&lt;br /&gt;
 Set($LdapServer, &amp;#039;ldaps://myDomainController.xxxxxxx.com&amp;#039;);&lt;br /&gt;
 Set($LdapTLS, 1);&lt;br /&gt;
 Set($LdapSSLVersion, 3);&lt;br /&gt;
&lt;br /&gt;
This worked with a Windows 2003 Domain Controller. No certs needed to be manually accepted.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>