Re: NT Authentication with Named Instances

"Mittel, Alexander" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <5EA97F57AE4E9D4BBC7879FEF671C0DA53501FAB23@DEFTHW99E15MSX.ww902.siemens.net>
Hi,

Can You look at file ERRORLOG of the SQL Server (i.e. with Server Management Studio)?
Can You look at "Event Viewer" of the Windows Server?
Can You use shares at the Windows Server if You connect to it from a Windows PC using username/password?

The initial error must come from Windows because Windows does the authentication, and if this fails
Windows send the User '' (or null) to SQL Server, and then of course SQL Server cannot assign a
SQL-User. [If I try to connect with an non-existent Windows-User I get the same error "Login failed for user ''....."
ERRORLOG show 2 errors and "Event Viewer" (security protocol) shows "unknown user or password"]

Before trying Perl You may try FreeTDS-tsql:
[/usr/local/freetds/bin/]tsql -H 147.54.157.28 -p 1737 -U 'windomain\username' -P password
[/usr/local/freetds/bin/]tsql -H 147.54.157.28 -p 1737 -U 'winserverhostname\username' -P password

Mfg Alexander

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Anon Ymous
Gesendet: Dienstag, 11. August 2009 18:21
An: [email protected]
Betreff: [freetds] NT Authentication with Named Instances

Hello FreeTDS enthusiasts! I first would like to say that I love FreeTDS and
the great connectivity it brings. I have a question for you all today, that
I have been having a hard time with lately. I have a SQL Server 2000 server
that I need to connect to via Linux FreeTDS. The server is in NT
Authentication mode only, and is using a named instance on port 4433. The
sql server is not connected to a domain, and can't be. The account I am
using to login is a local user on the server. Unfortunately, I cannot have
anything changed on the server, so I'm trying to work with what I have been
given. I am trying to connect using Perl's DBI:ODBC connection. For
reference, here is my DSN, (substituted localhost for real ip)

my $host = '127.0.0.1\InstanceName';
my $usr = 'HostName\UserName';
my $pw = 'Password';
my $dsn =
DRIVER=/usr/local/lib/libtdsodbc.so;SERVER=$host;PORT=4433;DATABASE=DataBase;UID=$usr;PW=$pw;TDS_Version=8.0";
my $dbh = DBI->connect('DBI:ODBC:'.$dsn) || die $DBI::errstr;

I keep getting the error, "Login failed for user '(null)'. Reason: Not
associated with a trusted SQL Server connection." I read the guide talking
about this, http://www.freetds.org/userguide/domains.htm, but the server is
set at "Send LM & NTLM - use NTLMv2 session secuiryt if negotiated". Here
are my conf files.

*odbc.ini*
[ODBC Data Sources]
VOIP
[VOIP]
Driver = FreeTDS
Description = Connection to the new voip DB
Trace = No
Server = 127.0.0.1
Port = 4433
Database = databasename
[Default]
Driver = FreeTDS

*freetds.conf*
[VOIP]
host = 127.0.0.1
instance = CRSSQL
port = 4433
client charset = UTF-8
tds version = 8.0

*odbcinst.ini*
[FreeTDS]
Description = FreeTDS Driver
Driver = /usr/local/lib/libtdsodbc.so


I can connect remotely by creating a user on my local windows maching that
matches the sql server user, and using Microsoft's Sql Server Management
Studio. I am hoping someone can help me, as I have run clean out of ideas.
My Google-fu seems to have failed me so far on this one.
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.