LdapAttrMap: Difference between revisions
m (2 revisions imported) |
(No difference)
|
Latest revision as of 15:14, 6 April 2016
Introduction
This is a configuration variable used by the LDAP integration overlay to correspond LDAP user attributes with RT user attributes. To set it properly, you'll need to understand your LDAP schema and which fields of it correspond to which attributes of an RT User object. For example, if your LDAP schema has these fields:
| LDAP field | Description | | uid | username | | mail | email address | | o | company name | | cn | real name | | dn | distinct name, always unique | | telephoneNumber | work phone | | ou | building | | physicalDeliveryOfficeName | office number |
...then you might set up the following mapping:
# Map RT attributes to LDAP attributes Set($LdapAttrMap, {'Name' => 'uid', 'EmailAddress' => 'mail', 'Organization' => 'o', 'RealName' => 'cn', 'ExternalContactInfoId' => 'dn', 'ExternalAuthId' => 'uid', 'Gecos' => 'uid', 'WorkPhone' => 'telephoneNumber', 'Address1' => 'ou', 'Address2' => 'physicalDeliveryOfficeName'} );
If you look at schema.mysql, there is a table named 'Users' which corresponds to the attribute keys above.
Windows Active Directory
When using Windows Active Directory (WAD), it's very important to map:
Name => 'sAMAccountName'
Here are mappings which should work with a Windows Active Directory server (Win2000 and Win2003).
Set($LdapAttrMap, {'Name' => 'sAMAccountName', 'EmailAddress' => 'mail', 'Organization' => 'physicalDeliveryOfficeName', 'RealName' => 'cn', 'ExternalContactInfoId' => 'dn', 'ExternalAuthId' => 'sAMAccountName', 'Gecos' => 'sAMAccountName', 'WorkPhone' => 'telephoneNumber', 'Address1' => 'streetAddress', 'City' => 'l', 'State' => 'st', 'Zip' => 'postalCode', 'Country' => 'co'} );
The MS Support Tools plugin adsiedit.mmc is the best way to tell which fields have what in AD. As cn will be the same as uid (well it is for us at least) you may well want
'RealName' => 'displayName',
2007/09/28 - Edward Kovarski; Here is a more extensive mapping known to work in Windows 2003
Set( $LdapAttrMap, {
'Name' => 'sAMAccountName', 'EmailAddress' => 'mail', 'Organization' => 'physicalDeliveryOfficeName', 'RealName' => 'cn', 'ExternalContactInfoId' => 'dn', 'ExternalAuthId' => 'sAMAccountName', 'Gecos' => 'sAMAccountName', 'HomePhone' => 'homePhone', 'WorkPhone' => 'telephoneNumber', 'MobilePhone' => 'mobile', 'PagerPhone' => 'pager', 'Address1' => 'streetAddress', 'Address2' => 'postOfficeBox', 'City' => 'l', 'State' => 'st', 'Zip' => 'postalCode', 'Country' => 'co', 'FreeformContactInfo' => 'info', }
);
Microsoft Exchange
- Here are the mappings that i use for pulling Ldap info from our Exchange 5.5 Server (I use OpenLDAP for auth).*
Set($LdapAttrMap, {'Name' => 'uid', 'EmailAddress' => 'mail', 'Organization' => 'Company', 'RealName' => 'cn', 'NickName' => 'givenName', 'ExternalAuthId' => 'uid', 'Gecos' => 'info', 'WorkPhone' => 'telephoneNumber', 'ExternalContactInfoId' => 'department', 'Address1' => 'postalAddress', 'Address2' => 'l'} );
I used ethereal on the RT Server to identify these attributes so if you need to map additional attributes this is a good way to go about finding them.
Zimbra Collaboration Suite
Set($LdapAttrMap, {'Name' => 'uid', 'EmailAddress' => 'mail', 'Organization' => 'ou', 'RealName' => 'cn', 'ExternalContactInfoId' => 'dn', 'ExternalAuthId' => 'uid', 'WorkPhone' => 'telephoneNumber', 'Signature' => 'zimbraPrefMailSignature'} );
Signature doesn't seem to auto-update as I expected.