MSFN Forum: Windows PE and SQL connection Error 'NT AUTHORITY\ANONYMOUS L - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Windows PE and SQL connection Error 'NT AUTHORITY\ANONYMOUS L Rate Topic: -----

#1 User is offline   marshalleboc 

  • Group: Members
  • Posts: 1
  • Joined: 14-September 11
  • OS:none specified
  • Country: Country Flag

Posted 21 September 2011 - 06:31 AM

Hello,

I'm trying to query a SQL 2005 database/server using vbscript running windows PE 2.1 (Vista + SP1). If it works I can finaly use the database to lookup the computername for OS-deployment.

I tried a lot of things but still get an Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' error.

I know this is caused by the nature of windows PE which uses Local Anonymous account for network connections. The SQL server is a domain connected Microsoft SQL 2005 server. The log shows me :

Logon Error: 18456, Severity: 14, State: 11.
Logon Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. [CLIENT: 1.2.3.4]

This state means the login was valid but server access failed.

For connction I use the following connection string :

sConnectString = "Provider=SQLOLEDB;Data Source=servername;Initial Catalog=database;User ID=domain\username;Password=password;Integrated Security=SSPI"

The user is a domain user. I tried this script on a domain connected windows (win 7) machine and it works, so the trouble is in the local anonymous user network connections.

Does anybody knows how to solve this problem or an other smart secure way to query a ms sql database under windows PE 2.1 ?

Thanks.


#2 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 7,349
  • Joined: 28-April 06
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 21 September 2011 - 09:05 AM

Did you build your WinPE with the MDAC package?

There's not a lot of info about how to exactly use it but you can find some topics about using MDAC in WinPE to talk to MSSQL. such as
http://www.eggheadca...m-mdt-2008.aspx

#3 User is online   allen2 

  • Not really Newbie
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,439
  • Joined: 13-January 06

Posted 21 September 2011 - 02:23 PM

To fix this kind of behavior you might try to authenticate with :
net use \\remotesqlservername\ipc$ /u:domain\username password
before trying your connexion to the SQL server.
Note if the IPC$ share doesn't work try any shared folder (or create one).

#4 User is offline   willwin7 

  • Group: Members
  • Posts: 1
  • Joined: 13-January 12
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 13 January 2012 - 10:05 AM

I was having the same issue.

I used the following connection string.

"Provider=SQLOLEDB.1;Persist Security Info=False;User ID=<User ID>;Initial Catalog=pubs;Data Source=<YourDataSourceName>;Network Library=dbnmpntw"

http://support.microsoft.com/kb/238949

HTH,

W

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy