This is not, at this time, an official ITS document. ITS does not currently endorse or support Active Directory binding or logins on Mac OS X systems. RIT has a unique directory and account management infrastructure and we have not qualified Mac OS X against it with a thorough test plan. We do not recommend binding Mac OS X computers to our Active Directory, especially when faculty/staff accounts are involved.
Therefore, these instructions serve as guidelines for internal use/troubleshooting, but do not constitute a recommendation to use Active Directory with Mac OS X systems at RIT.
The goal of troubleshooting Active Directory problems on Mac OS X is to not only get the client system to work quickly when it is being used, but also to collect enough data so that if it doesn't work, we can determine what caused the problem. In some cases, the data collected will need to be compiled into a bug report suitable for sending to a vendor, which in most of these cases will be Apple.
If you are having login problems, verify that the computer is already bound. You should check the local system first:
% sudo dsconfigad -showYou should also confirm that a computer object for the host system you are examining is present in the Active Directory.
If a computer is bound to the Active Directory but its date and time are incorrect, login failures are guaranteed. Check the four major components of date and time:
Why? Active Directory uses Kerberos. Kerberized logins will fail on any client if its time is off by more than ±5 minutes from the Active Directory domain controllers. The domain controllers themselves should be synchronizing to the RIT time servers (ntp.rit.edu). Therefore, each AD-bound Macintosh should sync to either the RIT time server or the Apple time servers (if the computer will be leaving the RIT network).
There are times when you will need to set the date and time manually before performing network time sync.
You may synchronize time by unlocking the Date & Time System Preferences with an administrator account.
The following command can also synchronize a workstation's time with the default NTP time server on demand:
% ntpdate -uvs
We have a script which can verify Microsoft’s recommended forward, reverse, and resource records for Active Directory. This can be run to periodically or manually verify DNS for Active Directory.
Please contact me if you want to try this script, but realize that I already check on the DNS records for RIT's Active Directory domain.
Mac OS X Tiger and Leopard automatically configure Kerberos for Active Directory. Kerberos is the single-sign on (SSO) authentication method used by Active Directory, and happily, Mac OS X shares this critical protocol suite.
The "kerberosautoconfig" tool is used to configure Kerberos automatically on Mac OS X when used with Active Directory.
More to come on this topic later!
[Leopard and later] Check the configuration files for the local directory service, DSLocal, to see if there are any 0-length files that correspond to your Active Directory forest or domain. If there are, this may be part of your problem (as seen on a thread in the MacEnterprise mailing list).
$ sudo ls -al /private/var/db/dslocal/nodes/Default/config/
total 48
drwx------ 9 root wheel 306 Oct 27 13:28 .
drwx------ 8 root wheel 272 Apr 8 2008 ..
-rw------- 1 root wheel 256 Oct 27 12:35 AD DS PlugIn.plist
-rw------- 1 root wheel 781 Oct 27 11:37 Kerberos:AD.RIT.EDU.plist
-rw------- 1 root wheel 796 Oct 27 13:28 Kerberos:MAIN.AD.RIT.EDU.plist
-rw------- 1 root wheel 1215 Apr 8 2008 KerberosKDC.plist
drwx------ 4 root wheel 136 Jun 21 09:55 SharePoints
-rw------- 1 root wheel 255 Oct 14 07:48 SharePoints.plist
-rw------- 1 root wheel 447 Jul 22 13:19 mcx_cache.plist
Look for plist files whose names begin with "Kerberos." If one or more are 0 bytes in size, then they are likely corrupt (because they have no data) and thus can probably be removed safely.
These plist files for your domain appear to be constantly updated. This makes sense, as upon examination, you'll see cached domain controller references. Having a stale cache of that information would likely be bad.
The following instructions assume that you will have the time and in-person access to the computer, and an account admin-level access. Since most of the steps involve command line utilities, you may also adapt them to run remotely with a secure protocol, such as SSH. If you have an Active Directory bound computer with remote access, you should harden your OpenSSH sshd_config file to prevent unauthorized and/or unwanted Active Directory logins, as any account in the directory has the potentially of logging into the system. SSH probes are common all across the Internet.
Whether you are logging in locally or remotely, you should harden the sudoers file appropriately for any technicians, to limit access to only those commands needed for this service, rather than giving full sudo rights.
Detailed logs and network traffic recordings can help us determine what caused an Active Directory related problem. It can also serve as supporting material we can attach to bug reports to Apple. You should collect this information while troubleshooting all varieties of Active Directory problems.
% sudo tcpdump -i en0 -n -s 0 -w /Users/Shared/tcpdump-`namegen`-`mktemp XXXXXX` port domain or port ldap or ldaps or kerberos or kpasswd or msft-gc or msft-gc-ssl% sudo tcpdump -i en0 -n -s 0 -w /Users/Shared/tcpdump-`defaults read /System/Library/CoreServices/SystemVersion ProductName | sed 's/ Server/-Server/g' | tr -d ' ' | tr '[:upper:]' '[:lower:]'`-`defaults read /System/Library/CoreServices/SystemVersion ProductVersion`-`defaults read /System/Library/CoreServices/SystemVersion ProductBuildVersion`-`arch`-`date +%Y%m%d`-`mktemp XXXXXX` port domain or port ldap or ldaps or kerberos or kpasswd or msft-gc or msft-gc-ssl% sudo tcpflow -i en0 -c port domain or port ldap or ldaps or kerberos or kpasswd or msft-gc or msft-gc-ssl > /Users/Shared/tcpflow-name% sudo killall -USR1 DirectoryService% dscl localhost -list .% dscl /Search -read /% dscl /Active\ Directory/All\ Domains -read Users/userid% id userid% su userid% exit% dirt -u userid% sudo killall -USR1 DirectoryServiceYou must collect the various logs and traffic dumps in order to analyze them. This data should be handled securely because it may contain sensitive information, such as account passwords.
The logs can be examined in the Console utility. The tcpdump recordings can be examined in Ethereal.
As a reminder, ITS does not currently endorse or support Active Directory binding or logins on Mac OS X systems.
Unbinding and rebinding a computer is a potentially-destructive action. In particular, the original SID of the computer object in the Active Directory can be lost.
If you still cannot log in with any Active Directory accounts or have other problems, you should attempt to rebind the computer to the directory. You should always try collecting data before rebinding a client computer to the directory, so that we can use that data to further examine the problem later. If you rebind the computer right away and it works, we have lost an opportunity for study of what went wrong in the first place. (Granted, as a system administrator or technician, you will have to weigh each situation on its merits and act accordingly.)
While rebinding, you should either continue the above logging/traces, or restart them (as below). This can uncover additional information that may be useful in troubleshooting.
When starting new network traces, please use a new filename for them so you don't overwrite any you have already captured.
Some Mac OS X Tiger systems bound to our Active Directory exhibit delays or failures with user logins when attempted outside of the campus network. We are investigating, but in general, you can assume that Active Directory services are unavailable to Mac OS X users beyond the friendly confines of the campus network.
In the meantime, creative use of Fast User Switching and a local account on the system can allow you to create a VPN tunnel for long enough to allow an Active Directory user to login. YMMV.
For off-campus systems bound to the directory, we have found (thanks to Lance Ogletree of Rice University) that removing the Active Directory from the list of authentication sources in Directory Access can resolve login delays and some failures. Each user that will login must have a valid mobile account cached on the computer, which means they will have to log in before the authentication path is modified.
We are investigating automation to assist with this process, and change it based on whether the computer detects whether or not it is on the campus network.
Copyright © 2005-2008 by Rochester Institute of Technology.