WinRS running as 'NT AUTHORITY\ANONYMOUS LOGON' instead of passed in user


i trying run remote batch file using local environment variables.  so, calling cmd.exe within cmd.exe evaluate local environment variable within command string.

for example: winrs -r:dev002 cmd.exe /c "cmd /c "^%epdir^%\tags\2.3.0\utils\batch\epsetup.bat" -r machine "

when runs, calls correct batch file, fails with:

unhandled exception: system.data.entityexception: underlying provider failed on open. ---> system.data.sqlclient.sqlexception: login failed user '
nt authority\anonymous logon'.
   @ system.data.sqlclient.sqlinternalconnection.onerror(sqlexception exception, boolean breakconnection)

...

 

is there approach can take execute batch file under correct impersonated credentials?

 

thank you,

michael

 

 


msdn premium subscriber

i have simplified command line to: winrs -r:dev002 -d:^%epdir^%\tags\2.3.0\utils\trna\epsetup\bin\debug epsetup.exe -r machine

this fails same error.  injecting username via -u command fails.

i trying not use psexec without real impersonation, won't fly.


msdn premium subscriber


Windows Server  >  Management



Comments

Popular posts from this blog

DCOM received error "2147746132" from...

DFSR RPC replication errors 5014 1726 with large files over VPN

ADFS 3.0 Event ID 4625 | An Error occurred During Logon | Status: 0xC000035B