- Mac OS X and OpenLDAP
- Index
- Introduction
- Open Directory
- The OpenLDAP additions
- Schemas
- Adding containers
- Making the Mac talk LDAP
- Connecting to OpenLDAP
- Denying SASL Mechanisms
- Mapping attributes
- LDAP Browser For MAC
- LDAP Admin Tool For MAC Features:
- LDAP Admin Tool v6.10 has been released!
- Access multiple directory servers
- Welcome to the Cutting Edge
- Query LDAP like Database
- Настройка доступа к каталогу LDAP в Службе каталогов на Mac
Mac OS X and OpenLDAP
It is about attributes
© 2014 Dennis Leeuw dleeuw at made-it dot com
License: GPLv2 or later
Index
Introduction
There are a lots of documents on the Internet about how to tie a Mac OS X client to an OpenLDAP server. This document is my attempt to providing this information.
Open Directory
Open Directory (opendirectoryd) is a wrapper around several information stores, one of which is can be a LDAP-server. If an application needs to know the users home-directory it asks Open Directory to get that information, so Open Directory needs to know where to fetch that. This is what this document is about. How to cofigure Open Directory in such a way that it knows where to retrieve the data and especially how to tell it to obtain the data from our own OpenLDAP server, since we assume that you already have an OpenLDAP-infrastructure to begin with.
About assumtions, we make a couple more. We assume you have already included the samba.schema or samba.ldif schema-file within your LDAP-server. We also assume you use Simple Bind (-x) to access your LDAP-server.
The OpenLDAP additions
Schemas
We have to extend OpenLDAP with some additional schema files. We will not blindly add the Mac OS X apple.schema file as provided by Apple, but we provide our own version. The mentioned schema files can all be downloaded from das.made-it.com. To load them in the correct order make sure your slapd.conf looks something like this: If your current slapd.conf includes nis.schema you can safely replace that with the RFC2307bis schema, it contains the same attributes and classes, and a bit more. The one you can download from DAS Project has already commented out the uidNumber and gidNumber attributes, since these are OpenLDAP slapd builtins.
Mac OS 10.9.2 retrieves the userPassword from the LDAP-server that means that an ACL in the slapd.conf like this: will not work. The Mac’s should be able to read the userPassword field so I ended up doing this: This allows the entire local network to read the values of the password fields. It’s not ideal but it at least makes it work.
Adding containers
Mac OS X searches the LDAP-tree using the base and filtering on: (&(objectClass=organizationalUnit)(ou=macosxodconfig)), to support having the LDAP Mappings in the LDAP-tree we add this ou with: Later we will fill this with the correct data.
Making the Mac talk LDAP
Connecting to OpenLDAP
From System Preferences select the Users & Groups utility. Click on Login Options and select the Join. button:
At the Server: prompt provide the FQDN or IP-address of your LDAP-server.
Click Continue if you get the messages that no secure (SSL) connection can be found. After the system is ready detecting the LDAP-server you should see the Network Account Server with a green dot in front of it. Note also the extra checked element that is added to Allow network users to log in.
Running: should show the server-name.plist file.
In the Users & Groups utility click Edit. behind the Network Account Server.
Select the server and click Open Directory Utility.
Double Click the LDAPv3 line. Set the LDAP Mappings field to RFC2307 and supply the Search Base Suffix.
To finish this procedure click Ok.
To make sure the machine uses our LDAP-server:
To check the user list:
To make sure the SearchPath is right:
Edit /etc/auto_master and comment the line that starts with /home, then
Create the home directory of an LDAP-user, with the correct access rights, and test with:
If you messed up, delete the Network Account Server from the Users & Groups Utility and run:
Denying SASL Mechanisms
Since Mac OS X 10.7.2 (Lion) Open Directory will attempt to connect to OpenLDAP via SASL mechanisms. If your OpenLDAP server uses Simple Bind Lion will not fall back to that, but will refuse to log you on. Versions before 10.7 only used Simple Bind and thus worked without problems.
Wireshark shows that the first thing a Mac does is connecting to the LDAP server and asking the server root to filter on (objectClass=*) and requesting supportedSASLMechanisms, defaultNamingContext, schemaNamingContext and saslRealm.
If we mimick that with ldapsearch for the supportedSASLMechanisms it would look like this: Which results in something like this:
To make the Mac play nice again, we have to run the following command on the Mac (replace yourldapserver with the name of of your LDAP server) for every mechanism offered by your LDAP server:
Mapping attributes
Go back to the Directory Utility and at:
select New.
Click the Search & Mappings tab. Set the Access this LDAPv3 server using to Open Directory. Per entry in the left column correct the Search Base to reflect the DLAP-tree.
After that make sure that Users uses: inetOrgPerson, posixAccount, shadowAccount and apple-user.
Groups should be set to: posixGroup and apple-group
If you like to make more adjustments go ahead. When you are done select Save Template.
Create an LDIF-file like this: Adjust the DN and the file path to your local situation.
Use: To add the Template.plist to your LDAP-tree.
On the other clients you can now set the LDAP Mappings setting to From Server instead of RFC2307.
The client will request for the Search Base and figures out the rest.
Источник
LDAP Browser For MAC
LDAP Admin Tool, a ldap and active directory browser and editor is a graphical tool designed to provide a user friendly environment in which to connect to any ldap aware directory server, modify data , run queries, export and print data. LDAP Admin Tool works directly with OpenLDAP, Netscape/iPlanet, Novell eDirectory, Oracle Internet Directory, IBM Tivoli Directory, Lotus Domino, Microsoft Active Directory, Sun One Directory or any other LDAP v2 or LDAPv3 directory server. It is a comprehensive administration tools for ldap configuration, user administration, and much more. With LDAP Admin Tool users can perform one click switching from one connection to another and one click schema browsing. |
LDAP Admin Tool For MAC Features:
Supported MAC Platforms:
Mac Os x (Intel & PPC 64 bit architecture) |
Installation Instructions: MAC OSx version is supplied as an installer executable. To perform the installation, simply launch the installer once the download is completed.
Ldap Admin Tool has been tested on Mountain Lion on Intel Core i7 processor.
LDAP Admin Tool v6.10 has been released! 
Access multiple directory servers
LDAP Admin Tool allows you to access OpenLDAP, Netscape/iPlanet, Novell eDirectory, Oracle Internet Directory, IBM Tivoli Directory, Lotus Domino, Microsoft Active Directory or any other LDAP v2 or LDAPv3 directory server. You can also connect to multiple directory servers simultaneously and copy data across servers.
Welcome to the Cutting Edge
LDAP Admin Tool sets the pace with dozens of new features, including the search tool bar, attribute editors, tabbed browsing, sqlldap search, server monitor and fast performance.
LDAP Admin Tool allows you to connect to the ldap server using SSL/TLS. You can add certificate to your store using Manage Certificates or it will prompt you to add the certificate to your store (Like any html browser.. Would you like to continue any way).
Query LDAP like Database
LDAP Admin Tool allows you to search the LDAP using SQL like syntax. It provides two powerful tools which allow you either to edit query text directly with syntax highlighting or to build a query visually with a drag and drop of keywords and attributes.
‡ Scheduling and command line features are only available in professional edition compare editions
Terms of Service | DMCA Policy | Copyright © 2012-2013 LDAPSoft Corporation. All rights reserved.
Источник
Настройка доступа к каталогу LDAP в Службе каталогов на Mac
С помощью Службы каталогов можно задать способ доступа компьютера Mac к каталогу LDAPv3. Вам необходимо знать DNS-имя или IP-адрес сервера каталогов LDAP.
Если этот каталог находится не на сервере, предоставляющем собственные соответствия (например, macOS Server), Вам необходимо знать базу поиска и шаблон соответствия данных macOS данным этого каталога.
Поддерживаются следующие шаблоны соответствий:
Сервер Open Directory — для каталога, который использует схему Server.
Active Directory — для каталога, который постоянно находится на сервере Windows 2000 или более новой версии.
«RFC 2307» — для большинства каталогов, постоянно находящихся на серверах UNIX.
Плагин LDAPv3 полностью поддерживает отказоустойчивость и репликацию Open Directory. Если оригинал Open Directory становится недоступным, этот плагин автоматически использует ближайший дубликат.
Чтобы задать пользовательские соответствия данных этого каталога, следуйте инструкциям из раздела Настройка доступа к каталогу LDAP вручную, а не инструкциям, приведенным ниже.
Важно! Если в имени компьютера содержится дефис (-), Вам, возможно, не удастся установить связь с доменом каталогов (например, LDAP или Active Directory). Чтобы установить связь, используйте имя компьютера, которое не содержит дефис.
В приложении «Служба каталогов» на Mac нажмите «Службы».
Нажмите значок замка.
Введите имя пользователя и пароль администратора, затем нажмите «Изменить конфигурацию» (или используйте Touch ID).
Выберите LDAPv3, затем нажмите кнопку «Изменить настройки выбранной службы» .
Введите DNS-имя сервера LDAP или IP-адрес в полях «Имя сервера» или «IP-адрес» соответственно.
Выберите «Шифровать с использованием SSL», если хотите, чтобы Open Directory использовал протокол защищенных сокетов (SSL) для соединений с каталогом LDAP.
Прежде чем это сделать, обратитесь к администратору Open Directory, чтобы определить, нужен ли SSL.
Если «Служба каталогов» не может связаться с сервером LDAP, попробуйте изменить настройки доступа. См. раздел Изменение настроек подключения для сервера LDAP или Open Directory.
Выберите новый сервер LDAP в списке, затем нажмите «Правка».
Нажмите «Поиск и соответствия».
Нажмите всплывающее меню «Получить доступ к этому серверу LDAPv3, используя», выберите значение «Open Directory» и введите начальные данные поиска.
Обычно начальные данные поиска основаны на DNS-имени сервера. Например, для сервера с DNS-именем ods.example.com начальные данные поиска могут быть следующими: «dc=ods,dc=example, dc=com».
Если сервер каталога поддерживает надежное связывание, нажмите «Связать» и введите имя компьютера и имя и пароль администратора каталога.
Связывание может быть необязательным.
Надежное связывание является обоюдным. При каждом подключении компьютера к каталогу LDAP выполняется взаимная идентификация. Если надежное связывание уже настроено или каталог LDAP не поддерживает надежное связывание, кнопка «Связать» отсутствует. Убедитесь, что Вы правильно ввели имя компьютера.
Если Вы видите предупреждение о том, что имеется запись компьютера, попробуйте ввести другое имя компьютера или нажмите «Перезаписать», чтобы заменить имеющуюся запись компьютера.
Возможно, имеющаяся запись компьютера не используется или принадлежит другому компьютеру.
Перед заменой имеющейся записи о компьютере уведомите об этом администратора данного каталога LDAP, чтобы такая замена не привела к отключению другого компьютера. В этом случае администратор каталога LDAP должен присвоить отключенному компьютеру другое имя и добавить его снова к той группе компьютеров, к которой он принадлежал.
Если каталог LDAP требует аутентификации, выберите «Использовать аутентификацию при подключении» и введите отличительное имя и пароль учетной записи пользователя в каталоге.
Аутентификация подключения не является обоюдной: сервер LDAP аутентифицирует клиента, а клиент не аутентифицирует сервер.
Отличительное имя может задавать любую пользовательскую учетную запись, которая обладает разрешением на просмотр данных в этом каталоге. Например, пользовательская учетная запись с коротким именем dirauth на LDAP-сервере с адресом ods.example.com будет иметь отличительное имя uid=dirauth,cn=users,dc=ods,dc=example,dc=com.
Важно! Если отличительное имя или пароль неверны, никто не сможет войти в систему, используя пользовательские учетные записи из этого каталога LDAP.
Нажмите OK, чтобы завершить создание соединения LDAP.
Нажмите OK, чтобы завершить конфигурацию параметров LDAPv3.
Если Вы хотите, чтобы компьютер имел доступ к настроенному каталогу LDAP, добавьте этот каталог в пользовательскую политику поиска в панелях «Аутентификация» и «Контакты» в разделе «Политика поиска» в Службе каталогов. О создании политик поиска см. в разделе Определение политик поиска.
Источник