Quantcast
Viewing all articles
Browse latest Browse all 10386

PsTools : PSEXEC credentials delegation issue when running e

Author: user999
Subject: PSEXEC credentials delegation issue when running e
Posted: 29 August 2014 at 9:59pm

I have a simple exe that just connects to SQL server and executes a select on a remote machine. In my scenario I have three machines: A,B, and C.

I am ruining PSExec from machine A as below:

& C:\PSTools\PSExec.exe \\MachineB C:\connectsql.exe -u username -p password

The exe, when executed on machine B, tries to connect to SQL server on machine C (based on the connection string I specified in the exe), which includes username and password as below:

"Data Source=machineC;Initial Catalog=AllDocs;Integrated Security=SSPI;User id=username;Password=pwd;"

Usernames and passwords are correct. But I get this error:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

But If I change the connection string in the exe to connect to SQL server on machine B itself, I do not see the issue.

Also, If I run the exe locally on Machine B it successfully connects to SQL on Machine C.

Any idea how I can get away with this issue, so that When PSExec runs on machine A, the exe from machine B should able to connect to sql on machine C?


Viewing all articles
Browse latest Browse all 10386

Trending Articles