Hi Sven
Yes, I agree - the (null)@domain.com entry is the (direct) reason for the failed login, but what is causing this entry to be wrong in the first place? I've been trying to track this down, but all I have is some guesses. I'll try to summarize them as systematically as possible.
AD structure: Our AD is a Win Server 2008 R2. All students and employees have an AD account in the main OU. All those users have the (null) entry (obviously I didn't check them all, but all that I looked at). I have only read access to those user accounts. Some institutions additionally have their own OU, as we do, where we can create users, add computers etc. The users in those OUs can usually log in (i.e. do not have the (null) entry), but not all of them.
User attributes: The "normal" users in the main OU are more "complicated" than the users I create in our OU. They have more different login names and more attributes.
If I look at users with dscl in 10.6 and 10.7, I can see differences in the attributes RecordName, AltSecurityIdentities, userPrincipalName and, of course, AuthenticationAuthority.
Examples:
Mac OS X 10.7, user csiege (can't login), output of dscl (partial):
dsAttrTypeNative:distinguishedName:
CN=Siegenthaler Christina (csiege),OU=Users,OU=Users XYZ,DC=d,DC=xyz,DC=ch
dsAttrTypeNative:name:
Siegenthaler Christina (csiege)
dsAttrTypeNative:sAMAccountName: csiege
dsAttrTypeNative:userPrincipalName: tina.siegenthaler@ieu.xyz.ch
AltSecurityIdentities: Kerberos:tina.siegenthaler@ieu.xyz.ch
AuthenticationAuthority: ;Kerberosv5;;(null)@D.XYZ.CH;D.XYZ.CH; ;NetLogon;(null);XYZ
RealName:
Siegenthaler Christina (csiege)
RecordName: tina.siegenthaler
Note: sAMAccountName is csiege, but RecordName is tina.siegenthaler (only 1 RecordName)
Output of dscl of the same user, but on 10.6:
dsAttrTypeNative:distinguishedName:
CN=Siegenthaler Christina (csiege),OU=Users,OU=Users XYZ,DC=d,DC=xyz,DC=ch
dsAttrTypeNative:name:
Siegenthaler Christina (csiege)
dsAttrTypeNative:sAMAccountName: csiege
dsAttrTypeNative:userPrincipalName: tina.siegenthaler@ieu.xyz.ch
AltSecurityIdentities: Kerberos:csiege@D.XYZ.CH
RealName:
Christina Siegenthaler (csiege)
RecordName:
csiege
tina.siegenthaler
siegenthaler christina (csiege)
csiege@d.xyz.ch
tina.siegenthaler@ieu.xyz.ch
XYZ\csiege
XYZ\siegenthaler christina (csiege)
Christina Siegenthaler (csiege)
tina.siegenthaler@ieu.xyz.ch
Note: Differences to 10.7 in AltSecurityIdentities; sAMAccountName is csiege, first (of 9!) RecordNames is also csiege
Again 10.7, user csiege-adm (one of my "own" users), can log in:
dsAttrTypeNative:distinguishedName:
CN=Siegenthaler Christina (csiege-adm),OU=Admins,OU=IEU,OU=XYZ,DC=d,DC=xyz,DC=ch
dsAttrTypeNative:name:
Siegenthaler Christina (csiege-adm)
dsAttrTypeNative:sAMAccountName: csiege-adm
dsAttrTypeNative:userPrincipalName: csiege-adm@d.xyz.ch
AltSecurityIdentities: Kerberos:csiege-adm@d.xyz.ch
AuthenticationAuthority: ;Kerberosv5;;csiege-adm@D.XYZ.CH;D.XYZ.CH; ;NetLogon;csiege-adm;XYZ
RealName:
Siegenthaler Christina (csiege-adm)
RecordName: csiege-adm
Note: sAMAccountName csiege-adm, RecordName csiege-adm (again, only one, but matches sAMAccountName); difference to user csiege seen from 10.7 in userPrincipalName
Users on AD: As I mentioned, I only have limited access to most AD users (and I'm not very good with AD either), but I have found the following:
User logon name for csiege: tina.siegenthaler@ieu.xyz.ch
User logon name for csiege-adm: csiege-adm@d.xyz.ch
I have no idea if these differences mean anything, and I may be on a completely wrong track here, but I think they are at least suspicious. And they're the only differences I have found so far.
/System/Library/OpenDirectory/Templates/Active Directory.plist:
From this part
<key>dsAttrTypeStandard:AuthenticationAuthority</key>
<dict>
<key>custom</key>
<dict>
<key>attributes</key>
<array>
<string>sAMAccountName</string>
<string>userPrincipalName</string>
</array>
<key>translate</key>
<string>ActiveDirectory:translate_authauthority</string>
</dict>
</dict>
it seems that a function "translate_authauthoriy" uses sAMAccountName and userPrincipalName to calculate the AuthenticationAuthority attribute. I have tried and changed the attribute strings, but to no effect, even if I used some non-existing attribute names.
I really wish they would stop breaking Directory Services with each and every update...
Any thoughts, comments?
Tina