Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

xp_cmdshell Error code 1385

$
0
0

Trying to execute a sproc that reads a Windows directory using xp_cmdshell and getting error:
"A call to 'LogonUserW' failed with error code: '1385'."

What I've done so far:

1. Enabled the xp_cmdshell procedure 
2. Created a Windows login for a non-sysadmin user: "mydomain\CmdShell_User". This user has public access toMaster.
3. GRANT EXECUTE ON xp_cmdshell TO [mydomain\CmdShell_User]
4. Created a proxy account: CREATE CREDENTIAL ##xp_cmdshell_proxy_account## with identity = 'mydomain\CmdShell_User', secret = 'somepassword'

The sproc executes successfully under my login, but other users get the above error.

Any suggestions would be welcome. Thanx!

SQL Server version:12.0.5579.0


Darrell H Burns



Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>