If you use the CD version of Mac OS X Server 10.4 to upgrade a Mac OS X Server 10.3 Open Directory Master, you will experience issues with user authentication and Kerberos. These issues do not occur if you upgrade using the Installation DVD or NetInstall.
To see if your upgraded server is affected by this issue, open the log file, /Library/Logs/slapconfig.log. If your server is affected, you will see the following messages:
2005-06-28 14:46:15 -0700 - slapconfig -migrateldapserver .... 2005-06-28 14:46:48 -0700 - 5 Updating data in LDAP ... 2005-06-28 14:46:49 -0700 - ldapdelete command output: ldap_bind: Can't contact LDAP server (-1) 2005-06-28 14:46:49 -0700 - ldapdelete command failed with status 1
In addition, you will see this overview message in Server Admin when you select the hostname of the server in Computers & Services:
"This server contains new or upgraded services that need to be configured to use sign-on Kerberos authentication. Services that already use Kerberos on this server will not be affected. Select Open directory in the Computers & Services list, then click settings."
If you can't install from DVD or NetInstall, you can still prevent the issue while using the CD if you disable Auto Server Setup prior to installation. After the installation is complete, you will be taken directly into Server Assistant. Do not complete the assistant yet. Though this would not be done under normal circumstances, you must restart the server before using the assistant. To do this, either ssh the reboot command, quit Server Assistant ( this will power off the system) or hold the power button. After restart, use Server Assistant to continue as normal.
After using the assistant, you'll need to copy a Kerberos command and preference file from another Mac OS X 10.4 system (either a server or client). To copy the "kerberosautoconfig" command from another 10.4 system, use the scp command in this manner (replacing "otherserver" with the name of the computer from which you intend to copy in the following commands):
% scp otherserver:/sbin/kerberosautoconfig /sbin
Then copy the "KerberosAutoConfig.plist" file from another 10.4 server by entering this:
% scp otherserver:/etc/mach_init.d/KerberosAutoConfig.plist /etc/mach_init.d
Alternatively, you could copy the contents of the plist file using the text below. Just copy everything below the following line, paste it into a text editor, and save it as a plain text file (not RTF) as "KerberosAutoConfig.plist" at /etc/mach_init.d/.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple. com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>ServiceName</key> <string>com.apple.KerberosAutoConfig</string> <key>Command</key> <string>/sbin/kerberosautoconfig -x</string> </dict> </plist>
End copy above this line
If you are experiencing these issues and need to recover, follow these steps:
% kdcsetup -e % sso_util configure -r REALM -x -v 1 all % sso_util configure -r REALM -x -v 1 ldap
% /sbin/kerberosautoconfig
root# ldapadd -U locadmin -W -Y CRAM-MD5 Enter LDAP Password: SASL/CRAM-MD5 authentication started SASL username: locadmin SASL SSF: 0 <enter this text> dn: cn=neighborhoods,dc=example,dc=com cn: neighborhoods objectClass: container <press Control D> adding new entry "cn=neighborhoods,dc=example,dc=com"
root# ldapadd -U locadmin -W -Y CRAM-MD5 Enter LDAP Password: SASL/CRAM-MD5 authentication started SASL username: locadmin SASL SSF: 0 <enter this text> dn: cn=accesscontrols,dc=example,dc=com cn: accesscontrols objectClass: container <press Control D> adding new entry "cn=accesscontrols,dc=example,dc=com"
access to attr=userPassword by self write by sockurl="ldapi://%2Fvar%2Frun%2Fldapi" write by group/posixGroup/memberUid="cn=admin,cn=groups,dc=example,dc=com" write by * read access to attr=apple-user-authenticationHint by self write by sockurl="ldapi://%2Fvar%2Frun%2Fldapi" write by group/posixGroup/memberUid="cn=admin,cn=groups,dc=example,dc=com" write by * read access to attr=apple-user-picture by self write by sockurl="ldapi://%2Fvar%2Frun%2Fldapi" write by group/posixGroup/memberUid="cn=admin,cn=groups,dc=example,dc=com" write by * read access to * by sockurl="ldapi://%2Fvar%2Frun%2Fldapi" write by group/posixGroup/memberUid="cn=admin,cn=groups,dc=example,dc=com" write by * read
root# ldapadd -U locadmin -W -Y CRAM-MD5 Enter LDAP Password: SASL/CRAM-MD5 authentication started SASL username: locadmin SASL SSF: 0 <enter this text> dn: cn=schema,cn=config,dc=example,dc=com cn: schema objectClass: top objectClass: container objectClass: extensibleObject <press Control D> adding new entry "cn=schema,cn=config,dc=example,dc=com"
% cp /etc/openldap/slapd_macosxserver.conf /etc/openldap/slapd_macosxserver.conf.backup
access specified-in-directory apple-acl "cn=default,cn=accesscontrols,dc=example,dc=com"
% reboot