I need to connect to sql server using Windows authentication on a mac.

I want to use kinit but I have problem with generate DC name. On windows I ran command:

nltest /dsgetdc:xx.xx.com

And output is:


I can log into this server on windows using SQL Server Management Studio so I know the account I want to use is working for the level of access I want to grant.

How can I connect with this server to get kerberos tickets / use an AD account in general with Finder to mount shares?

  • 1
    I'm voting to close this question as off-topic because its blatantly off topic; not about Apple products. – JBis Sep 20 '18 at 11:52
  • @JBis mac is not Apple product? – CezarySzulc Sep 20 '18 at 12:23
  • 2
    This is totally on topic. See my answer @JBis - no harm casting a vote if it's not clear - people can always flag if everyone jumps to the conclusion that this is windows due to the information and lack of an edit to show the correct tags to identify this as a kerberos / bind situation. The only reason to close this is if we need to provide a replacement to SQL Server Studio in addition to getting the binding / kerberos / AD connection set for the mac in general. – bmike Sep 20 '18 at 18:47

We use Apple Enterprise connect to get kerberos tickets

$ klist
Credentials cache: API:0E08F2A4-F095-4D1D-82A5-69113AF983D0
        Principal: bmike@AD.CONTOSO.INT

  Issued                Expires               Principal
Sep 20 11:20:42 2018  Sep 20 21:20:42 2018  krbtgt/AD.CONTOSO.INT@AD.CONTOSO.INT
Sep 20 11:20:42 2018  Sep 20 21:20:42 2018  ldap/xyz-addc01.ad.contoso.int@AD.CONTOSO.INT

You could use macOS to bind directly, but there's pain there unless you are just binding your personal workstation and not deploying that across an enterprise. A solution that isn't Apple is NoMad (which was recently acquired by JAMF software)

As long as they are still allowing downloads of that tool, I would start there and then work up to something larger / different if you have a reason to do so.

I would repeat, don't bind until you have exhausted all other options.


Looks like a DNS issue. Are you using a local/private DNS server or manually managing your hosts file? What happens if you ping the domain name? Does the SQL Server have any security profiles configured to only allow certain IPs which excludes your machine?

  • Ping works normally from mac machine. I can check it by nmap too. Windows machine is in the same network and there is no problem to log into. DNS is private but if ping works then I think it's not problem of DNS. – CezarySzulc Sep 20 '18 at 12:52
  • Are you authenticating your Mac using Active Directory (via Directory Utility)? Details available via Apple Support : support.apple.com/kb/PH26282?locale=en_GB&viewlocale=en_US – Steve Sep 20 '18 at 13:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .