远程文件权限 [英] Remote File Permissions

查看:53
本文介绍了远程文件权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大型计算机系统,所有计算机都以相同的方式配置。我需要将文件夹从管理计算机复制到网络上的所有计算机,但问题是我需要能够复制冒充每台计算机的管理员帐户的文件。有没有人知道如何以编程方式,使用.Net,设置远程计算机的用户身份,以便可以将文件复制到该计算机?谢谢。

I have a large scale computer system where all of the computers are configured in the same way. I need to copy a folder from an administrative computer to all of the computers on the network, but the problem is I need to be able to copy the files impersonating the administrator account for each computer. Does anybody know how to programmatically, using .Net, set the user identity for a remote computer so that a file can be copied to that computer? Thanks.

推荐答案

您需要使用远程计算机进行身份验证。 Windows机器(当前)一次只支持单个网络登录。所以你需要相当于"net use \\remote_computer \ ipc
You need to authenticate with the remote computer. Windows machines (currently) only support a single network logon at a time. So you need the equivalent of "net use \\remote_computer\ipc


"。不幸的是,我不知道如何用.NET做到这一点。一个快速的谷歌搜索刚出现了一些免费的互操作解决方案,所以它似乎没有在.NET库中提供。

有关详细信息的更多信息,请参阅:
http://ntutils.sourceforge.net/
(点击"远程管理"并向下滚动到"如何运作")。这是我多年前写的一个项目(在非托管C ++中),它使用远程登录来远程执行代码。

或者,您可以使用PowerShell甚至批处理脚本"net use /USER ...。"每台机器的命令。然后你会一直自动登录。当然,更简单的设置是在每台计算机上授予您的帐户管理员权限。那你就不用做任何事了。 :)

-Steve
". Unfortunately, I don't know of a way to do that with .NET. A quick Google search just turned up a few free interop solutions, so it doesn't seem to be provided in the .NET libraries.

For more information on the details, see:
  http://ntutils.sourceforge.net/
(click on "Remote Administration" and scroll down to "How it Works"). This is a project I wrote many years ago (in unmanaged C++) that uses remote logons to remotely execute code.

Alternatively, you could PowerShell or even batch script the "net use /USER..." command for each machine. Then you'd have automatic logins all the time. Of course, an even easier setup is to give your account admin permissions on each machine. Then you wouldn't have to do anything. :)

       -Steve


这篇关于远程文件权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆