简体   繁体   English

以其他用户(服务帐户)身份运行程序(exe),访问网络共享

[英]Run program (exe) as different user (service account), access to network share

From couple of days I'm strugling with problem. 从几天开始,我一直在努力解决问题。 I must write a small application which runs another app with different credentials (service account). 我必须编写一个小型应用程序,该应用程序可以使用不同的凭据(服务帐户)运行另一个应用程序。 Everything is easy but on the server we have a policy that denies log on service accounts and the policy can't be removed. 一切都很容易,但是在服务器上,我们有一个拒绝登录服务帐户的策略,并且该策略无法删除。

I tried: Process class, Impersonating mechanism, CreateProcessWithLogonW, CreateProcessAsUser 我试过:流程类,模拟机制,CreateProcessWithLogonW,CreateProcessAsUser

with different configurations. 具有不同的配置。 Once I managed to log on with service account I have error network path not found. 一旦成功使用服务帐户登录,我将找不到错误的网络路径。

CreateProcessWithLogonW works perfectly on local machine but not on the server where this policy is. CreateProcessWithLogonW可以在本地计算机上完美运行,但不能在该策略所在的服务器上运行。 Maybe I'm missing some certain configuration. 也许我缺少某些配置。

I've got solution. 我有解决办法。 This was configuration problem. 这是配置问题。 Server didn't have proper DNS entries for DFS (Distributed File System). 服务器没有用于DFS(分布式文件系统)的正确DNS条目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在网络服务帐户下访问 Windows 共享 - Access Windows Share under Network Service account 当未将root共享访问权限授予用户时,从网络共享运行.net exe将部分信任运行 - Running a .net exe from a network share runs in partial trust when the access to root-shared is not granted to user WCF服务Process.Start在网络服务帐户下模拟为不同的用户 - WCF service Process.Start under network service account impersonating as a different user 如何授予对NETWORK SERVICE帐户的SQL访问权限? - How to give SQL access to NETWORK SERVICE account? 服务应在哪个Windows帐户下运行才能访问网络sql服务器 - what Windows account should a service run under to access network sql servers c#授予用户使用广告服务帐户访问网络文件夹的权限 - c# Grant user access to network folder using ad service account Process.Start一个exe文件作为另一个用户在网络共享上 - Process.Start an exe file on an network share as another user Windows服务无法访问网络服务帐户以访问msmq - windows service has access denied to the Network Service account to msmq CreateProcessAsUser:服务尝试访问网络共享的“ 5:访问被拒绝” - CreateProcessAsUser: Service gets “5: Access Denied” trying to access network share 从网络共享运行c#.NET程序 - Run c# .NET Program from network share
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM