Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a service that exports a file to a location on the server, however I need this service to be able to copy the file to another domain as well as the current one. I have attempted to run the service using admin rights but that will not work as the system admin is on domain1/admin and this does not have access to domain2 same as domain2/admin does not have access to domain1. Is it possible to skip the log on part of a service?

share|improve this question

3 Answers 3

No - the way I see it, there are only a few ways around this:

  1. Enable a trust between your two domains, so that DOMAIN1\User has rights to copy a file to DOMAIN2's server

  2. Write the service so that it can internally authenticate with DOMAIN2's file share using DOMAIN2\User

  3. The only other way I could think of would be to map a network drive in the context DOMAIN1\User, to the DOMAIN2 file sharer using DOMAIN2\User credentials. Then, run the service in the context of DOMAIN1\User. To be honest, I don't know if this will work

  4. If possible, use a scheduled task instead of a service. You could definitely do (3) using a batch file, then

  5. NOT RECOMMENDED - Allow anonymous access to the file share. Please don't do this, it's just here for completeness

share|improve this answer

No, your service has to run under SOME security context. You'll need to run it as a user that has access to resources on both domains, making sure that the proper trusts exist between the domains.

share|improve this answer

You're going to need to use an account that has permission in both domains. Assuming you have a trust of some sort between the two, you're going to want to grant the service account running your service the appropriate rights on the servers in each domain.

share|improve this answer
    
Is there any way to do this without a trust? –  user165639 Mar 21 '13 at 15:01
1  
Re-write your service to authenticate using alternate credentials for each domain and rely on your app for the authentication and not the account running the service. –  MDMarra Mar 21 '13 at 15:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.