Join Domain For Mac



Join

  1. Join Domain Joined Machine To Azure Ad
  2. Join A Domain Windows 10
  3. Join Domain For Mac Download

You can use the Active Directory connector (in the Services pane of Directory Utility) to configure your Mac to access basic user account information in an Active Directory domain of a Windows 2000 or later server. The Active Directory connector generates all attributes required for macOS authentication from Active Directory user accounts. If the lock icon at the bottom left of the page is locked, click it and enter your password when prompted. Click the Join button. By default, the user login options are locked to prevent unauthorized changes. This step unlocks the settings so that you can join the domain. You’re prompted to enter the name of the domain you want to join. Before attempting a domain join from a Mac computer, we need to make sure that we have our server- and client-side networking correctly configured. This means, in a nutshell, that our Macs have: An IP address and subnet mask; A DNS hostname; A connection to a Windows DNS server. Domain join by Windows Autopilot and autojoin via Azure AD Connect or ADFS config Windows 8.1, Windows 7, Windows Server 2012 R2, Windows Server 2012, and Windows Server 2008 R2 - Require MSI Device sign in options.

Joining a Mac to Active Directory has continued to get more and more difficult over the years. High Sierra and Mojave now require a Active Directory functional level of Windows Server 2008 or later and are still pretty tricky to get to join it.

When I started researching the topic I saw a whole lot of advice to install third party software to join a Mac to Active Directory. In most corporate environments installing third party software is frowned upon due to licensing and security considerations so I was determined to get the native Mac OS X tools to work.

This guide will walk you through the basic steps to join Active Directory without having to resort to using third party software.

Configure DNS Settings

One of the big roadblocks to joining Active Directory is DNS settings. In many networks DHCP won’t populate everything you need. Windows can get away with this but when we are joining our Mac we need to make sure everything is populated.

The easiest way to get everything you need is to issue a ipconfig /all from the command prompt of a Windows machine already joined:

I have bolded the important things you need to verify.

You want to make sure that all of the DNS Suffix Search List entries are listed in the “Search Domains” box pictured below:

Next verify that all of the DNS servers coming up on your Windows machine are also put into the Mac DNS servers list. On my machine I got all of the DNS servers but only one of the search domains. Make sure it matches your already joined machine!

Configure Network “Sharing” Name

Go to the Settings app on your Mac again and choose “Sharing”.

This part is easy. Set this to the computer name you are going to join the domain with. Usually the existing one will be something like “admin’s iMac”.

Prestaging AD Computer Account

Next open up Active Directory and create a new “Computer” account.

I strongly recommend keeping your Mac name to 15 characters or less. This is demonstrated in the screenshot below. If that isn’t possible then use the pre-Windows 2000 computer name when you join Active Directory or you will get an error (see Troubleshooting).

Press OK to create the Active Directory account. Now switch back to the Mac and let’s perform the bind.

Join Active Directory

Next go back to the Settings app and choose “Users and Groups”.

From here we are going to select “Login Options” in the bottom left hand of the screen. You will now see a “Network Account Server” with a Join button. Click join and fill everything out as follows:

Use your fully qualified domain name (FQDN). This is usually the same as your “Primary DNS Suffix” we got from our Windows machine. This allows us to get around any DNS configuration shenanigans.

For the Active Directory settings put in the pre-Windows 2000 computer name from the above step. If you chose a name of 15 characters or less they will both be the same.

For your AD username don’t try to use anything like DOMAINuser or user@domain. We have already fully qualified our server in the server field so this is not necessary and will cause problems. Enter it as in the example above.

Now press OK and with any luck you will be met with a screen that looks like this:

Troubleshooting

Plugin Error 10001

This is the most common error you will get when you try to join High Sierra or Mojave to Active Directory. There are a few reasons it can come up.

Apple states that your Active Directory needs to be at a functional level of Windows Server 2008 to work unless you enable “weak encryption” RC4 algorithm support in your forest. This would be a terrible idea as RC4 was broken many years ago and is a joke to crack.

However even with a functional level of 2008 I have yet to see it work regardless without prestaging the computer in Active Directory first and then attempting to join. Prestaging has fixed this error on all of the Macs I have joined to domains.

There are a few other requirements from Apple on the list that could be contributing but likely with prestaging you will be able to bind even without things like extended schema support, etc.

Plugin Error 5103

This error is frequently encountered if the name of your PC is too long. You should join the domain with the “pre-Windows 2000” computer name or even better choose a name for the Mac that is 15 characters or less.

My domain ends with .local

This is bad. Very bad. This has been a long standing issue with joining Macs to Active Directory as .local is what Apple’s own Bonjour uses by default. It used to be a matter of simply changing or disabling Bonjour but that has no longer proven effective.

Using .local has been against best practices for many years but not everyone has migrated their domains yet. If you are stuck in this situation and telling your sysadmins to get a grip and migrate their domain is not an option then you may have to consider a third party AD stack. Here’s a lengthy spiceworks discussion on this topic.

If you have been able to find a workaround for this issue in Mojave or High Sierra definitely drop a comment below so we can share it but I was not able to find an instance of anyone getting around this in the newer versions of OS X without going third party. Anime studio pro 11 for mac torrent pirate bay.

Join Domain Joined Machine To Azure Ad

Conclusion

As long as you aren’t in a .local domain the native built-in tools should prove perfectly sufficient to join Mac OS X High Sierra and Mojave provided we use prestaging.

That being said I can only speak for the environments I have worked in. If you follow this guide and encounter additional problems definitely leave a comment below so we can get that information out there!

You should also check out Apple’s Active Directory integration guide as they cover some requirements that you may have ran into that I didn’t.

Directory Utility User Guide

Important: With the advanced options of the Active Directory connector, you can map the macOS unique user ID (UID), primary group ID (GID), and group GID attributes to the correct attributes in the Active Directory schema. However, if you change these settings later, users might lose access to previously created files.

Bind using Directory Utility

  1. In the Directory Utility app on your Mac, click Services.

  2. Click the lock icon.

  3. Enter an administrator’s user name and password, then click Modify Configuration (or use Touch ID).

  4. Select Active Directory, then click the Edit button (looks like a pencil).

  5. Enter the DNS host name of the Active Directory domain you want to bind to the computer you’re configuring.

    The administrator of the Active Directory domain can tell you the DNS host name.

  6. If necessary, edit the Computer ID.

    The Computer ID, the name the computer is known by in the Active Directory domain, is preset to the name of the computer. You can change it to conform to your organization’s naming scheme. If you’re not sure, ask the Active Directory domain administrator.

    Important: If your computer name contains a hyphen, you might not be able to bind to a directory domain such as LDAP or Active Directory. To establish binding, use a computer name that does not contain a hyphen.

  7. (Optional) Select options in the User Experience pane.

    See Set up mobile user accounts, Set up home folders for user accounts, and Set a UNIX shell for Active Directory user accounts.

  8. (Optional) Select options in the Mappings pane.

    See Map the group ID, Primary GID, and UID to an Active Directory attribute.

  9. (Optional) Select advanced options. You can also change advanced option settings later.

    If the advanced options are hidden, click the disclosure triangle in the window.

    • Prefer this domain server: By default, macOS uses site information and domain controller responsiveness to determine which domain controller to use. If a domain controller in the same site is specified here, it’s consulted first. If the domain controller is unavailable, macOS reverts to default behavior.

    • Allow administration by: When this option is enabled, members of the listed Active Directory groups (by default, domain and enterprise admins) are granted administrative privileges on the local Mac. You can also specify desired security groups here.

    • Allow authentication from any domain in the forest: By default, macOS automatically searches all domains for authentication. To restrict authentication to only the domain the Mac is bound to, deselect this checkbox.

    See:

  10. Click Bind, then enter the following information:

    Note: The user must have privileges in Active Directory to bind a computer to the domain.

    • Username and Password: You might be able to authenticate by entering the name and password of your Active Directory user account, or the Active Directory domain administrator might need to provide a name and password.

    • Computer OU: Enter the organizational unit (OU) for the computer you’re configuring.

    • Use for authentication: Select if you want Active Directory added to the computer’s authentication search policy.

    • Use for contacts: Select if you want Active Directory added to the computer’s contacts search policy.

  11. Click OK.

    Directory Utility sets up trusted binding between the computer you’re configuring and the Active Directory server. The computer’s search policies are set according to the options you selected when you authenticated, and Active Directory is enabled in Directory Utility’s Services pane.

    With the default settings for Active Directory advanced options, the Active Directory forest is added to the computer’s authentication search policy and contacts search policy if you selected “Use for authentication” or “Use for contacts.”

    However, if you deselect “Allow authentication from any domain in the forest” in the Administrative Advanced Options pane before clicking Bind, the nearest Active Directory domain is added instead of the forest.

    You can change search policies later by adding or removing the Active Directory forest or individual domains. See Define search policies.

Bind using a configuration profile

The directory payload in a configuration profile can configure a single Mac, or automate hundreds of Mac computers, to bind to Active Directory. As with other configuration profile payloads, you can deploy the directory payload manually, using a script, as part of an MDM enrollment, or by using a client-management solution.

Payloads are part of configuration profiles and allow administrators to manage specific parts of macOS. You select the same features in Profile Manager that you would in Directory Utility. Then you choose how the Mac computers get the configuration profile.

In the Server app on your Mac, do the following:

  • To configure Profile Manager, see Start Profile Manager in the macOS Server User Guide.

  • To create an Active Directory payload, see Directory payload settings in Mobile Device Management Settings for IT Administrators.

If you don’t have the Server app, you can download it from the Mac App Store.

Bind using the command line

You can use the dsconfigad command in the Terminal app to bind a Mac to Active Directory.

Join A Domain Windows 10

For example, the following command can be used to bind a Mac to Active Directory:

dsconfigad -preferred <adserver.example.com> -a <computername> –domain example.com -u administrator -p <password>

After you bind a Mac to the domain, you can use dsconfigad to set the administrative options in Directory Utility:

Join domain mac terminal
dsconfigad -alldomains enable -groups domain <admins@example.com>, enterprise <admins@example.com>

Advanced command–line options

The native support for Active Directory includes options that you don’t see in Directory Utility. To see these advanced options, use either the Directory payload in a configuration profile; or the dsconfigad command–line tool.

  • Start reviewing the command–line options by opening the dsconfigad man page.

Computer object password interval

When a Mac system is bound to Active Directory, it sets a computer account password that’s stored in the system keychain and is automatically changed by the Mac. The default password interval is every 14 days, but you can use the directory payload or dsconfigad command–line tool to set any interval that your policy requires.

Setting the value to 0 disables automatic changing of the account password: dsconfigad -passinterval 0

Domain

Note: The computer object password is stored as a password value in the system keychain. To retrieve the password, open Keychain Access, select the system keychain, then select the Passwords category. Find the entry that looks like /Active Directory/DOMAIN where DOMAIN is the NetBIOS name of the Active Directory domain. Double-click this entry, then select the “Show password” checkbox. Authenticate as a local administrator as needed.

Namespace support

macOS supports authenticating multiple users with the same short names (or login names) that exist in different domains within the Active Directory forest. By enabling namespace support with the Directory payload or the dsconfigad command–line tool, a user in one domain can have the same short name as a user in a secondary domain. Both users have to log in using the name of their domain followed by their short names (DOMAINshort name), similar to logging in to a Windows PC. To enable this support, use the following command:

dsconfigad -namespace <forest>

Packet signing and encryption

The Open Directory client can sign and encrypt the LDAP connections used to communicate with Active Directory. With the signed SMB support in macOS, it shouldn’t be necessary to downgrade the site’s security policy to accommodate Mac computers. The signed and encrypted LDAP connections also eliminate any need to use LDAP over SSL. If SSL connections are required, use the following command to configure Open Directory to use SSL:

dsconfigad -packetencrypt ssl

Note that the certificates used on the domain controllers must be trusted for SSL encryption to be successful. If the domain controller certificates aren’t issued from the macOS native trusted system roots, install and trust the certificate chain in the System keychain. Certificate authorities trusted by default in macOS are in the System Roots keychain. To install certificates and establish trust, do one of the following:

  • Import the root and any necessary intermediate certificates using the certificates payload in a configuration profile

  • Use Keychain Access located in /Applications/Utilities/

  • Use the security command as follows:

    /usr/bin/security add-trusted-cert -d -p basic -k /Library/Keychains/System.keychain <path/to/certificate/file>

Restrict Dynamic DNS

macOS attempts to update its Address (A) record in DNS for all interfaces by default. If multiple interfaces are configured, this may result in multiple records in DNS. To manage this behavior, specify which interface to use when updating the Dynamic Domain Name System (DDNS) by using the Directory payload or the dsconfigad command–line tool. Specify the BSD name of the interface in which to associate the DDNS updates. The BSD name is the same as the Device field, returned by running this command:

networksetup -listallhardwareports

Join

Join Domain For Mac Download

When using dsconfigad in a script, you must include the clear-text password used to bind to the domain. Typically, an Active Directory user with no other administrator privileges is delegated the responsibility of binding Mac computers to the domain. This user name and password pair is stored in the script. It’s common practice for the script to securely delete itself after binding so this information no longer resides on the storage device.