We've been battling connectivity issues for our Macs in our Active Directory domain. We ran across it today trying to join some new OS X Lion systems to our .local domain.
After installing the Centrify DirectControl 4.4.3 agent on Mac OS 10.7, the following issues are observed:
- If the home directory is located on a SMB share, it will take a long time time to login.
- If a Centrify user logs in and tries to mount a SMB share folder in Finder, it will take a long time to login.
- Centrify may be in disconnected mode (adinfo -V on a terminal).
The problem exists on Mac OS 10.7, because 10.7 always uses Bonjour first to resolve any .local hostname. If Bonjour fails (timeout), it will then use standard DNS, thus causing the delay.
For Mac, the .local domain is reserved for Bonjour, and the Mac will only lookup these hostname using Bonjour (multicast). On Mac OS 10.7, a hostname that contains only one level under .local (i.e. xxx.local) is resolved using multicast, other hostnames are resolved using both multicast and unicast (multicast first). It will try several times with a timeout (default 5 seconds for each try). If the host cannot be resolved, then it will try unicast. This is the reason for the mount delay.
Under these conditions, it may not be possible to ping domain.local, therefore adclient will stay in disconnected mode for up to 60 seconds after start.
NOTE: The following steps require root or sudo privileges. Customers are advised to take a backup of the original files in an alternate location to avoid any mistakes when editing these files.
The below step forces Mac 10.6/10.7 to do both multicast and unicast query to xxx.local. On the DNS server (AD or Unix), create a primary zone "local". You do not need to modify it. Just SOA (Start of Authority) needs to exist in this zone. After configuration, restart mDNSResponder on the Mac by running # sudo killall mDNSResponder. Then you should be able to ping domain.local.
Mac 10.7 always does both IPv4 and IPv6 query. Disabling IPv6 won't stop the Mac from doing IPv6 query, but it improves performance. Unfortunately you cannot disable IPv6 from System Preferences and so you need to manually edit the /Library/Preferences/SystemConfiguration/preferences.plist on the Mac.
Find the network adapter (Ethernet or Airport) under NetworkServices key, then edit the IPv6 setting and change the config method to "__INACTIVE__":
There's no way to change the DNS lookup order, so what we can do is to reduce the multicast DNS timeout by editing mdns_timeout in "/System/Library/SystemConfiguration/IPMonitor.bundle/Contents/Info.plist". The default setting is 5. Set mdns_timeout to 0 by editing the /System/Library/SystemConfiguration/IPMonitor.bundle/Contents/Info.plist and changing the value to 0 as shown below:
If you set mdns_timeout to 0, then you won't be able to ping any ".local" host/domain, but other apps such as Finder and Apple's AD plugin work well (it can resolve a .local hostname). You can login as a network home user really fast.
If you try to mount a SMB share in Finder, although it first prompts that there's a problem connecting to the server, eventually it will connect if you wait for several seconds and retry. This prompt can be solved by adding the machine that hosts the DNS server and Windows share into /etc/hosts file on the Mac:
where 192.168.x.x is the IP address of the DNS server in your organization.
NOTE: As you cannot ping domain.local, adclient will stay in disconnected mode for up to 60 seconds after start (which means you need to wait for more than 1 minute after reboot). Adding domain.local into /etc/hosts solves the disconnect issue.
You need to REBOOT the Mac after performing steps 1) through 4).
Login to Mac and you should not see any delay during login. Also you should not see any delay when mounting a SMB folder in Finder.
None. This is an Apple Bug. Centrify opened a Bug 9887516 as well and we provided the above steps as a workaround after testing in the lab. For more information on Bonjour and how it works, please refer to the link from Apple: http://www.apple.com/support/bonjour/