Skip to content

How to use Kerberos ticket cache on Linux? #468

Open
@sliekens

Description

@sliekens

Hello,

I want to use Kerberos on Debian 11 to authenticate with SQL Server but I'm struggling to get sqlcmd to catch on with what I'm trying to accomplish.

$ sqlcmd -E -S redacted\\inst01 --driver-logging-level=64
DRIVER:Dialing with protocol tcp
DRIVER:Returning connection from protocol tcp
DRIVER:got token tokenError
DRIVER:got ERROR 18456 Login failed for user ''.
DRIVER:got token tokenDone
DRIVER:got DONE or DONEPROC status=2
mssql: login error: Login failed for user ''.
mssql: login error: Login failed for user ''.

I have krb5-user and krb5-conf packages installed.

I logged in with kinit before running sqlcmd, which created a ticket cache in /tmp/krb5cc as is evident when I run klist.

$ klist
Ticket cache: FILE:/tmp/krb5cc
Default principal: redacteduser@REDACTED.DOMAIN

Valid starting       Expires              Service principal
10/10/2023 13:53:59  10/10/2023 23:53:59  krbtgt/REDACTED.DOMAIN@REDACTED.DOMAIN
        renew until 10/17/2023 13:53:55

Is it possible integrated authentication was just not implemented for Linux? I couldn't find any references to krb5conffile or krbcache in the code (which I believe is what the driver expects according to microsoft/go-mssqldb#35).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions