Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xp_cmdshell and dos command line

Status
Not open for further replies.

johnaregan

Programmer
Mar 13, 2001
87
Hi
I am trying to centralise changing user passwords on NT, SQL Server databases. In order to do this in a stored procedure I want to be able to call the dos command line
net user username password /domain
using xp_cmdshell.
When I use just an ordinary command like Dir it works fine but when trying to use the net user it fails.
Is this to do with permissions?, the login I am using for SQL Server is sa.
If it is permissions can anyone tell me where and how would I make the changes so that the command would work.

Thanks in advance
 
When you run xp_cmdshell, it runs under the SQL Server startup account. In order to modify passwords, the account must be a domain adminstrator. In general it is bad security policy to set up the SQL Server account as a domain administrator. I recommend that you NOT try to synchronize passwords from the SQL Server side. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top