1

I login to SQL Server with Administrator account and can execute the following query and get the result:

xp_cmdshell 'net user' // Works well, and displays all local Windows user accounts

But when I want to '/ADD' a new Windows user locally, with below query, the problem arise:

xp_cmdshell 'net user myUserName myPassWord /ADD'

Error message:

The EXECUTE permission was denied on the object 'xp_cmdshell', database 'mssqlsystemresource', schema 'sys'.

Mohammad Naji
  • 5,372
  • 10
  • 54
  • 79
  • I think your problem is pretty much this: http://stackoverflow.com/questions/2016669/getting-execute-permission-to-xp-cmdshell –  Nov 11 '13 at 08:53
  • 2
    Administrator on SQL Server is not the same with Domain Administrator. – bjnr Nov 11 '13 at 09:52

0 Answers0