Re: Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication.

Frediano Ziglio <[email protected]> Wed, 27 Feb 2019 08:50:10 +0000
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAHt6W4cdSBavL4d3e9jRnzCDp-0KDkRs1Wsh9JMeQjP1Z0nQiw@mail.gmail.com>
Il giorno mar 26 feb 2019 alle ore 15:59 Tille, Andreas
<[email protected]> ha scritto:
>
> Hi,
> I'm accessing an MSSQL server successfully since a long time.  Now this server was configured to encrypted connections and I get:
>
> $ sqsh -w 256 -h -S server -U domain\\user -D database
> sqsh-2.5.16.1 Copyright (C) 1995-2001 Scott C. Gray
> Portions Copyright (C) 2004-2014 Michael Peppler and Martin Wesdorp
> This is free software with ABSOLUTELY NO WARRANTY
> For more information type '\warranty'
> Msg 18452, Level 14, State 1
> Server ' server', Line 1
> Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication.
> Open Client Message
> Layer 0, Origin 0, Severity 78, Number 34
> Adaptive Server connection failed
>
>
> I'm using a backport of the latest Debian packages of sqsh and freetds in unstable on a Debian stretch system.  This is the change I did in /etc/freetds:
>

I would try to make tsql works first.

> diff --git a/freetds/freetds.conf b/freetds/freetds.conf
> index 1f5f633..f38864b 100644
> --- a/freetds/freetds.conf
> +++ b/freetds/freetds.conf
> @@ -13,6 +13,7 @@
>  ;      tds version = 4.2
>         tds version = 8.0

8.0? Still? See http://www.freetds.org/userguide/choosingtdsprotocol.htm.
Also check http://www.freetds.org/userguide/freetdsconf.htm.

>         client charset = UTF-8
> +       encryption = require
>

One option that could make a difference is also "use ntlmv2", try to set
to yes or no (in Debian the default should be still no).

>         # Whether to write a TDSDUMP file for diagnostic purposes
>         # (setting this to /tmp is insecure on a multi-user system)
>
>
> I did no other changes to the configuration of freetds.  Is there any description what to do to successfully access a MSSQL server that is configured to enforce encryption?  I've found some hints to ssltunnel but I doubt that this should be a proper solution.
>
> Any hint would be welcome, Andreas.

See also http://www.freetds.org/userguide/serverthere.htm and
http://www.freetds.org/userguide/logging.htm.

Frediano