How to Use Apple's Open Directory (2024)

Apple Directory Utility.

Directory Services provides a central place to store users and passwords for corporate and enterprise users. Here's how to use it on macOS.

Many enterprises today have a need for a central place to store information about users, passwords, groups, computers, and other networked entities.

In most organizations, this need is filled by the use of either Lightweight Directory Access Protocol (LDAP) servers or, in the case of Windows Server Microsoft's directory services built on LDAP, Active Directory.

When Apple bought NeXT in 1997 and released Mac OS X in 2000, it offered its own directory services included with OS X called NetInfo.

Along with NetInfo, Apple shipped an app called NetInfo Manager which was later renamed to Directory Utility. This allowed users to access NetInfo servers for user and group information.

Collectively these services are known as Directory Services. The idea behind directory services is to consolidate all user and device info in one place and use those services to authorize users for network resource access.

NetInfo was not popular with users or administrators, and it was removed from Mac OS X in version 10.4 Tiger. Instead, Apple began to migrate towards LDAP as it had become the standard for directory services.

Mac OS X Server

After Apple shipped Mac OS X Server, which included an LDAP server as well as other services, Mac OS X Server was later consolidated into an add-on app simply called "Server." The app be downloaded from the Mac App Store and added to the retail version of macOS.

The original Mac OS X Server retail package.

OS X Server allowed organizations to run their own LDAP server to store user info and authorize users. Server was later discontinued in 2022.

Apple Open Directory

Apple's implementation of LDAP is called Apple Open Directory and is a fork of the OpenLDAP project.

Apple Open Directory also includes an implementation of the Kerberos ticket-based authentication server.

In macOS, Apple Open Directory is managed by a background daemon called opendirectoryd.

Microsoft Active Directory

During all this, Microsoft developed its own Directory Services server called Active Directory (AD), which it introduced with Windows Server 2000.

Active Directory is one of the most widely used Directory Services in corporate and organization networks.

AD provides a number of services including LDAP, Windows Domain Services, Group policy, encryption, certificate, and Federation Services. Today, Microsoft also provides a cloud-based directory and user info service called Microsoft Entra ID.

All these Directory Services together can be used to query and authenticate users and user info for network resource use, and to look up contact info for particular users.

In Directory Services, a database of stored user or device objects is called a Domain.

Frameworks and development

For development, Apple provides two frameworks that can be added to any Xcode project and linked to a built Mac app: DirectoryServices.framework, and OpenDirectory.framework.

To add these frameworks to your Xcode project, navigate to a Target in your Xcode project, then click the "+" button in the Frameworks, Libraries, and Embedded Content pane in the General tab. From the sheet that appears, add DirectoryServices.framework, and OpenDirectory.framework

For additional UNIX Directory Services access, also add the libcodedirectory.tbd static library.

The Apple Open Directory API is surprisingly simple: just 9 classes and one protocol (QDQueryDelegate). Using the ODNode, QDQuery, QDRecord, and ODSession objects, you can start an OD session, configure it (ODConfiguration), then query a Directory Services server to manipulate OD records.

After submitting a query to OD, results are returned via the QDQueryDelegate protocol, which consists of a single method:

func query(ODQuery!, foundResults: [Any]!, error: (any Error)!)

Or in Objective-C:

- query:foundResults:error:

To add this functionality to your app, declare a class that conforms to the QDQueryDelegate protocol, then implement the query:foundResults:error method. Inside the method, your code can decide how to handle any data and errors returned.

Adding the Directory Services frameworks in Xcode.

When the OD query completes, this method will contain the original query object, any results for that query, and an error returned, if any.

For more info on the OpenDirectory.framework, see the Apple Developer Documentation.

Directory Utility

Originally Apple shipped the Directory Utility app in the /Utilities folder included with macOS.

Today, however, the app is hidden away in /System/Library/Core Services/Applications - most probably due to the push to move organizations to the cloud.

If you want to use Directory Utility, don't try to copy or move it to another location, as any copied versions won't work.

Instead make an alias to the app by either dragging it to the Dock in the Mac's Finder. You could also make an Alias to the app by holding down Command-Option and dragging the app to a location on your disk.

If you are using Kerberos services, there is another app in the same folder called Ticket Viewer. Ticket Viewer is simple and provides only the ability to add and remove Identities, set one Identity as the default, and change the password.

Using Directory Utility

Directory Utility provides several services. You can connect directly to any supported Directory Services server by using the File->Connect menu item, or you can use one of three tabs at the top of the main window:

  1. Services
  2. Search Policy
  3. Directory Editor

For the Directory Editor features, you must have an admin password to the services you want to edit.

The Services tab provides two simple options: Active Directory or LDAPv3.

Click the Lock icon at the bottom of the window, then select either to access a specific kind of server. Clicking the small Pencil icon at the bottom of the window displays a sheet for Directory Services on available servers.

You can also create a new Directory Services configuration by clicking the New button in the sheet.

Services tab in Directory Utility.

In the Search Policy tab you can view Authentication and Contacts info using an Automatic, Local, or Custom search path. The Search Policy tab allows you to view info for users in different directory Domains.

The Directory Editor tab allows you to edit Directory Services info directly, although as mentioned previously you'll need an admin password to do so. Be careful with the Directory Editor tab as it's easy to edit important information.

You can view just about any Directory Services info imaginable under the Editor tab, including settings for dozens of different daemons, services, and networking. If you're not careful, you can make changes to the services which may render parts of your Mac or server inoperable.

Directory Editor tab in Directory Utility.

For full information on how to use the Directory Utility app, see the Apple Directory Utility User Guide.

If you need to access a Windows Active Directory server, Apple also has a page titled Integrate Mac Computers with Active Directory in the Apple Platform Deployment guide.

LDAP is quite a complex topic and may take some time to master. For a somewhat concise overview, check out the LDAPWiki.

How to Use Apple's Open Directory (2024)

FAQs

How to Use Apple's Open Directory? ›

The macOS file system stores files within folders, also known as directories. The top, uppermost folder is known as the root directory. Folders located within or beneath the root directory are known as subfolders or subdirectories, two different ways of saying the same thing.

How does directory work on Mac? ›

The macOS file system stores files within folders, also known as directories. The top, uppermost folder is known as the root directory. Folders located within or beneath the root directory are known as subfolders or subdirectories, two different ways of saying the same thing.

How do I use Active Directory on Mac? ›

In the Directory Utility app on your Mac, click Services. Click the lock icon. Enter an administrator's user name and password, then click Modify Configuration (or use Touch ID). Select Active Directory, then click the “Edit settings for the selected service” button .

What directory does Apple use? ›

Open Directory is a robust directory architecture built into Apple's UNIX-based Mac OS X Server operating system.

Does Apple have Active Directory? ›

One of the services in Apple Directory Utility is Active Directory Connector which generates all the necessary attributes for macOS authentication from AD user accounts. It also supports AD authentication policies like password changes, expirations, and security options.

How do I use Directory Utility on Mac? ›

Open Directory Utility
  1. On your Mac, click the Spotlight icon (if shown) in the menu bar or press Command-Space bar. Tip: If the Spotlight icon isn't in the menu bar, add it using Control Center settings.
  2. In the search field, type Directory Utility—results appear as you type.
  3. In the results, click Directory Utility.

What is macOS open directory? ›

The term Open Directory can also be used to describe the entire directory services framework used by macOS and macOS Server. In this context, it describes the role of a macOS or macOS Server system when it is connected to an existing directory domain, in which context it is sometimes referred to as Directory Services.

How do I open the current directory on a Mac? ›

Just run command "open ." this will open current directory in finder.

What is the Mac equivalent of Active Directory? ›

LDAP and RADIUS are the best active directory alternatives for Linux and Mac.

How do I find my directory on Mac? ›

On your Mac, click the Finder icon in the Dock to open a Finder window. Choose View > Show Path Bar, or press the Option key to show the path bar momentarily. The location and nested folders that contain your file or folder are displayed near the bottom of the Finder window.

How to open home directory in Mac? ›

Use the keyboard shortcuts in the Finder: Command-Shift-H. Or use the Go menu, where Home — although it isn't called that when it opens — will show up.

What are open directories? ›

An open directory is a modern, cloud-forward directory of identities, devices, resources, connections, and events that is built to centralize management of any resource in your IT environment seamlessly.

Is Active Directory an app? ›

Active Directory (AD) is a directory service developed by Microsoft for Windows domain networks. Windows Server operating systems include it as a set of processes and services.

How do I access Active Directory? ›

To open Active Directory Users and Computers, log into a domain controller and use one of the following options: Click Start > Run > type dsa. msc in the Run dialog box > Enter. Click Start > Administrative Tools > Active Directory Users and Computers.

Do people still use Active Directory? ›

Microsoft hasn't abandoned AD DS/LDS quite yet. It continues to be the core identity system for many organizations and must continue to be secured from evolving threats. It is great to see Microsoft continue to make investments in these older technologies.

What is Active Directory called now? ›

The names Azure Active Directory, Azure AD, and AAD are replaced with Microsoft Entra ID. Microsoft Entra is the name for the product family of identity and network access solutions.

How do I access directories on a Mac? ›

In the Finder on your Mac, choose Go > Go to Folder. Start typing the folder's pathname (for example, /Library/Fonts/ or ~/Pictures/). As you type, matching folders appear. Type a slash (/) at the beginning of a pathname to indicate that the starting point is the top level of your computer's folder structure.

How does the directory work? ›

Directories branch downward from the root directory in the tree diagram and can contain both files and subdirectories. Branching creates unique paths through the directory structure to every object in the file system. Collections of files are stored in directories.

How to get directory path in Mac? ›

On your Mac, click the Finder icon in the Dock to open a Finder window. Choose View > Show Path Bar, or press the Option key to show the path bar momentarily. The location and nested folders that contain your file or folder are displayed near the bottom of the Finder window.

What is system directory in Mac? ›

The System folder is the directory in the classic Mac OS that holds various files required for the system to operate, such as fonts, system extensions, control panels, and preferences.

Top Articles
Latest Posts
Article information

Author: Maia Crooks Jr

Last Updated:

Views: 6442

Rating: 4.2 / 5 (63 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Maia Crooks Jr

Birthday: 1997-09-21

Address: 93119 Joseph Street, Peggyfurt, NC 11582

Phone: +2983088926881

Job: Principal Design Liaison

Hobby: Web surfing, Skiing, role-playing games, Sketching, Polo, Sewing, Genealogy

Introduction: My name is Maia Crooks Jr, I am a homely, joyous, shiny, successful, hilarious, thoughtful, joyous person who loves writing and wants to share my knowledge and understanding with you.