Jump to content

Windows PE and SQL connection Error 'NT AUTHORITY\ANONYMOUS L


marshalleboc

Recommended Posts

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.

Link to comment
Share on other sites


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).

Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...