Windows Servers can act as a certificate authority. (More info: http://www.serverwatch.com/tutorials/article.php/1473961) I have Windows 2000 Server running at home in a VirtualPC machine on my Mac. I fire it up, turn on the certificate authority, and then try to browse to http://servername/certsrv so that I can request and download a user certificate. Doesn't work in Safari. I can't log in to the site. Works fine in Firefox.
So, I mess around with settings. Perhaps Safari's trying to use some braindead version of NTLM authentication rather than basic authentication. Nope.... the tcpdump output I captured shows it isn't. Hrm... well, what if I use the Safari debug menu (http://www.macosxhints.com/article.php?story=20030110063041629) to change my User-Agent so that IIS thinks I'm using Mozilla, or IE6 on Windows? Nope, still doesn't work.
Finally, I go into the event log and see this gem:
Event Type: Warning
Event Source: W3SVC
Event Category: None
Event ID: 100
Date: 8/2/2004
Time: 9:30:50 PM
User: N/A
Computer: WIN2KSERVER
Description:
The server was unable to logon the Windows NT account 'bernielab\berniec' due to the following error: Logon failure: the user has not been granted the requested logon type at this computer. The data is the error code.
Safari's truly doing something wacky. I have no clue why IIS thinks Safari is trying to log on to the server (which happens to be the domain controller). Firefox doesn't pull this kind of tomfoolery!
I eventually had to go into Domain Controller Security Policy -> Local Policies -> User Rights Assignment -> Log on locally. In there, I added the "berniec" account to the list of users that are allowed to log in locally to the domain controller. I shouldn't have had to do this - ordinary users should have no rights to log into a domain controller. Hrm, stupid Apple.
So, after that, I finally was able to request and download a certificate. You can't directly import user certificates into Safari, but you can import them into a user's Keychain for future use by Safari. That part worked great. Keychain had zero problems importing the cert that was issued by the Windows CA. Hoorah.
Labels: Macintosh, Microsoft, Work