Ldap client mac os

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.

Читайте также:  Android до полноценного linux

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. 2. Easy Active Directory/ADAM Management and Administration 3. Connect to directories locally, remotely or using SSL 4. Easy SSL 5. Export data in excel, csv and ldif formats 6. Import data from ldif files 7. Create/Edit Password using SHA, SSHA, MD5, SMD5 and CRYPT 8. Tabbed Browsing 9. Drag and Drop 10. Simple and Advanced Search 11. Multiple LDAP Bind 12. SQL Syntax Search 13. Mass Update using sql like syntax 14. Powerful attribute editors 15. Access multiple directories 16. Browse Large directories 17. View all available attributes 18. Customization according to your needs 19. Multiple entries/directory sizing 20. Windows, linux & Mac versions available 21. Schedule SQLDAP Select to LDIF, CSV and Excel ‡ 22. Run LDIF, CSV and Excel Export from command line 23. Schedule Exports to File System and/or send them through Email 24. Schedule LDIF, CSV and Excel Export using MAC cron or other scheduler

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 ищет данные в каталоге LDAP. Каждая конфигурация каталога LDAP определяет, как компьютер Mac получает доступ к данным в каталоге LDAPv3 или LDAPv2. Эти настройки можно редактировать отдельно для каждой конфигурации каталога LDAP, указанной в Службе каталогов.

Вы можете изменить следующие элементы:

Соответствие каждого типа записи macOS классам объектов LDAP

Соответствие типов данных macOS (или атрибутов) атрибутам LDAP для каждого типа записи

База поиска и область поиска LDAP, которые определяют, где компьютер Mac выполняет поиск типа записи macOS в каталоге LDAP

При сопоставлении пользовательских атрибутов macOS домену каталога LDAP, работающему в режиме чтение/запись, атрибут LDAP, сопоставленный записи RealName, не должен совпадать с первым атрибутом в списке атрибутов LDAP, сопоставленных записям RecordName.

Например, атрибут cn не должен быть первым атрибутом, переадресованным в RecordName, если cn переадресован в RealName.

Если атрибут LDAP, сопоставленный записи RealName, совпадает с первым атрибутом, сопоставленным записи RecordName, при попытке редактирования полного (длинного) имени или первого короткого имени в macOS Server или в Редакторе каталогов возникнут проблемы.

Примечание. Если Вы нажали кнопку «Считать с сервера» для просмотра всех типов и атрибутов записей со связанного сервера, то типы записей, не найденные в локальном домене каталогов OS X, таких как AutoServerSetup или Neighborhoods, обозначаются в окне «Типы записей и атрибуты» красным цветом.

В приложении «Служба каталогов» на Mac нажмите «Службы».

Нажмите значок замка.

Введите имя пользователя и пароль администратора, затем нажмите «Изменить конфигурацию» (или используйте Touch ID).

Выберите LDAPv3, затем нажмите кнопку «Изменить настройки выбранной службы» .

Если список конфигураций сервера скрыт, нажмите треугольник раскрытия рядом с пунктом «Показать параметры».

Выберите конфигурацию сервера, а затем нажмите кнопку «Правка».

Нажмите «Поиск и соответствия».

Нажмите всплывающее меню «Доступ к серверу LDAPv3» и выберите шаблон сопоставления, чтобы использовать его в качестве отправной точки. Выберите «Пользовательский», чтобы начать без заранее заданных сопоставлений.

В случае выбора одного из шаблонов соответствия LDAP появится суффикс начальных данных поиска, который можно изменить. Также можно оставить предложенный по умолчанию суффикс, нажав «OK».

Добавьте типы записей и в случае необходимости измените их базы поиска.

Добавление типов записей. Нажмите кнопку добавления под списком «Типы записей и атрибуты». В появившемся окне выберите «Типы записей», выберите типы записей в списке, затем нажмите «ОК».

Изменение базы поиска и области поиска для типа записи. Выберите тип в списке «Типы записей и атрибуты», затем отредактируйте поле «База поиска». Выберите «все вложенные деревья каталогов», чтобы установить область поиска, которая охватывает иерархию каталога LDAP, начиная с базы поиска и ниже, или выберите «только первый уровень», чтобы установить область поиска, охватывающую только базу поиска и один уровень под ней в иерархии каталога LDAP.

Удаление типа записи. Выберите его в списке «Типы записей и атрибуты», затем нажмите кнопку «Удалить» .

Добавление соответствия для типа записи. Выберите тип записи в списке «Типы записей и атрибуты», затем нажмите «Добавить» под пунктом «Соответствие с__объектами списка» и введите имя класса объектов из каталога LDAP.

Добавление другого класса объектов LDAP. Нажмите клавишу Return и введите имя класса объектов. С помощью всплывающего меню, расположенного над списком, укажите, следует ли использовать перечисленные классы объектов LDAP.

Изменение соответствия для типа записи. Выберите тип записи в списке «Типы записей и атрибуты», затем дважды нажмите класс объектов LDAP, который требуется изменить в «Соответствие с__объектами списка», и отредактируйте его. С помощью всплывающего меню, расположенного над списком, укажите, следует ли использовать перечисленные классы объектов LDAP.

Удаление соответствия для типа записи. Выберите тип записи в списке «Типы записей и атрибуты», выберите класс объектов LDAP, который нужно удалить из раздела «Соответствие __ списка», затем нажмите кнопку «Удалить» (под разделом «Соответствие __ списка»).

Добавьте атрибуты и в случае необходимости измените их соответствия.

Добавление атрибутов для типа записи. Выберите тип записи в списке «Типы записей и атрибуты», затем нажмите кнопку «Добавить» (по списком записей и атрибутов). В появившемся окне выберите «Типы атрибутов», выберите тип атрибута, затем нажмите «ОК».

Добавление соответствия для атрибута. Выберите атрибут в списке «Типы записей и атрибуты», затем нажмите «Добавить» (ниже пункта «Соответствие с__объектами списка») и введите имя атрибута из каталога LDAP. Чтобы добавить новый атрибут LDAP, нажмите клавишу Return и введите имя атрибута.

Изменение соответствия для атрибута. Выберите атрибут в списке «Типы записей и атрибуты», дважды нажмите объект, который требуется изменить в «Соответствие с__ объектами списка», а затем отредактируйте имя объекта.

Удаление соответствия для атрибута. Выберите атрибут в списке «Типы записей и атрибуты», выберите объект, который нужно удалить из раздела «Соответствие __ списка», затем нажмите кнопку «Удалить» (под разделом «Соответствие __ списка»).

Изменение порядка отображения атрибутов в правом списке. Перетяните атрибуты в списке вверх или вниз.

Сохраните соответствия в виде шаблона или на сервере.

Чтобы сохранить соответствие в виде шаблона, нажмите «Сохранить шаблон».

Шаблоны, сохраненные в заданном по умолчанию месте, будут перечислены во всплывающих меню шаблонов соответствий LDAP при следующем открытии Службы каталогов. Местом по умолчанию для сохраненных шаблонов служит Ваша папка пользователя, расположенная по адресу:

/Библиотеки/Application Support/Directory Access/LDAPv3/Templates/

Чтобы хранить соответствия в каталоге LDAP, так чтобы он мог предоставлять их автоматически своим клиентам, нажмите «Записать на сервер», а затем введите базу поиска, чтобы хранить эти соответствия, отличительное имя администратора или другого пользователя с правом делать записи в базе поиска (например uid=diradmin,cn=users,dc=ods,dc=example,dc=com), и пароль.

Если соответствия записываются в сервер LDAP Open Directory, правильной базой поиска будет «cn=config,suffix» (где «suffix» — суффикс базы поиска, например dc=ods,dc=example,dc=com).

Каталог LDAP предоставляет соответствия клиентам Mac, пользовательская политика поиска которых включает в себя подключение, сконфигурированное для получения соответствий с сервера LDAP.

Каталог LDAP также предоставляет соответствия клиентам macOS, имеющим автоматическую политику поиска. См. разделы Настройка доступа к каталогу LDAP и Расширенные настройки политики поиска.

Источник

Читайте также:  Популярные оболочки для linux
Оцените статью