473,378 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Using xp_cmdshell to run application that uses domain credentials

I using MS SQLServer as a secure method of setting up system tasks and
processes for automated running. The intent is that all logins (ids
and passwords) are in a secure database table and are not sitting
around in batch files on the server.

Some of the tasks make use of network authentication, and this is where
the problem arises.

If I execute the command line from within SQLServer (via xp_cmdshell),
I get an error that says that the userid is missing. If I execute that
same command vid the CMD window, it works.

It appears that the shell that xp_cmdshell kicks off does not inherit
the domain authentication.

Aside from questions on why I am doing things this way as opposed to
using the windows scheduler or other tools, what do I need to do to
make sure that my domain credentials are passed?

Jul 27 '06 #1
1 4318
byrocat (bd******@sympatico.ca) writes:
I using MS SQLServer as a secure method of setting up system tasks and
processes for automated running. The intent is that all logins (ids
and passwords) are in a secure database table and are not sitting
around in batch files on the server.

Some of the tasks make use of network authentication, and this is where
the problem arises.

If I execute the command line from within SQLServer (via xp_cmdshell),
I get an error that says that the userid is missing. If I execute that
same command vid the CMD window, it works.

It appears that the shell that xp_cmdshell kicks off does not inherit
the domain authentication.

Aside from questions on why I am doing things this way as opposed to
using the windows scheduler or other tools, what do I need to do to
make sure that my domain credentials are passed?
What account does SQL Server run? It sounds like it's running under
Local System, which is not good for network access.

Overall, the whole thing sounds messy to me. The Windows user will be
the service account for SQL Server, which may not give the results
you wanted.

An alternative would be to have a client program that runs on the
SQL server machine and retrieves the passwords and then runs the programs.
Important is that connection is over shared memory, so that no intruder can
eavesdrop on the connection.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Jul 27 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Me | last post by:
hi, I have this file I need to execute from an ASP client. since we have installed it on the SQL Database server machine, I thought I could run it like this: Set Cn =...
3
by: Jay-nospam | last post by:
Hi there, I am having trouble getting an ASP.NET web application to connect to another computer and passing the proper credentials and I hope someone can help me. I have a stand-alone Windows...
2
by: rcp | last post by:
Hi all, I've read all posts from all existing threads and none of them worked to solve my problem, although its exactly the same. I'll try to explain my case and see if a kind soul could help me...
1
by: Screenbert | last post by:
After finding nothing anywhere in google I am posting this so everyone can benefit by it. The formating is not pretty since I copied it from my word document, but you should benefit by it. ...
0
by: screenbert | last post by:
Managing DHCP Servers using C# They said it was impossible. It couldn't be done. But you can in fact manage DHCP servers using C#. This includes creating and deleting Scopes, SuperScopes,...
3
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web...
0
by: milind1123 | last post by:
Currently I am working on MSN Project which has been developed in ASP.Net 2.0 and Backend is SQL Server 2005. Right now our application requirement is that we have to create the Job at runtime...
2
by: =?Utf-8?B?TGVuc3Rlcg==?= | last post by:
A C# (.NET 2) application which uses the System.Net.HttpWebRequest object to request a resource over HTTPS is failing following the installation of a new proxy server on our internal network with...
1
by: =?Utf-8?B?WW91IEJpZyBEdW1teQ==?= | last post by:
I have a web application that will upload files to ftp. I can succesfully do this if I specify the credentials using the ftpwebrequest.credentials property. But the problem is that we won't to be...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.