对远程PC的RPC调用被拒绝访问 [英] RPC call to remote PC gets access denied

查看:1539
本文介绍了对远程PC的RPC调用被拒绝访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用NetUserSetInfo访问远程PC中的Windows帐户。它适用于以前的Windows操作系统版本,直到我们最近切换到Windows 2008和Windows Vista,其中用户帐户控制已经过时。我们从系统获得访问被拒绝(错误5)。如何在不禁用UAC的情况下绕过UAC?感谢我们给予的任何可能的帮助。

We have used NetUserSetInfo to access windows account in the remote PC. It works well for previous Windows OS version until we switch to Windows 2008 and Windows Vista recently, where User Account Control is enebled. We got access denied (error 5) from the system. How can we get around UAC without disabling the UAC? Thanks for any possible help we can give.

推荐答案



检查这些

本文介绍了
“访问被拒绝” 错误发生在

Hi,

Check with these

This article describes the solution for the
“access denied” error occurs when

你试图连接到 Windows Vista   

you are trying to connect to a Windows Vista from a Windows 2008 Server . 


1.确保您拥有正确的凭证


 这是一个权限问题。如果净视图命令失败并显示"系统错误5已发生。访问被拒绝。"消息,1)确保您使用有权查看远程计算机上的共享的帐户登录。 
2)需要缓存凭据:登录相同的用户名和密码两台计算机或使用网络净使用
\\computername / user:username命令。
3)确保Netlogon服务正在运行..


 This is a permission issue. If the net view command fails with a "System error 5 has occurred. Access is denied." message, 1) make sure you are logged on using an account that has permission to view the shares on the remote computer. 
2) Need to cache credential: logon the same username and password on both computers or use net net use
\\computername /user:username command.
3) Make sure the Netlogon service is running..

2.在防火墙上打开RPC端口
API调用涉及使用RPC连接到远程计算机。在大多数情况下,RPC服务正在运行,您可以从服务管理界面确认。要打开RPC端口,只需在Windows防火墙设置中启用"文件和打印机共享"。

2. Open RPC ports on firewall
An API call involves connecting to a remote machine use RPC. In most cases the RPC service is running and you can confirm that from the service management interface. To open RPC ports, simply enable “File and Printer Sharing” in the Windows Firewall setting.

(通常,如果RPC被远程计算机上的防火墙阻止,则错误应为"1722" RPC服务器不可用"而不是"5访问被拒绝")

3.禁用"强制访客"登录

您可以从本地安全策略或注册中更改此选项。

本地安全策略:运行secpol.msc> Secuirty设置>本地策略>安全选项> ;网络访问:本地帐户的共享和安全模型,并设置为"经典"。

注册表:在HKEY_LOCAL_MACHINE \SYSTEM \ CurrentControlSet \Control \ Lsa中查找"forceguest"项,并将其设置为0.

这两种方式是等效的。如果此选项设置为1,则远程登录用户将被模拟作为Guest帐户(如果Guest帐户被禁用,登录失败)。将其设置为0允许用户自己登录。

4.如果你仍然收到"拒绝访问权限"并且只有在远程操作系统是Windows vista时才会发生,这很可能是以下情况。

要确认,你需要一个包嗅探器,如Wireshark(一个很棒的免费软件)。
当您使用嗅探器捕获SMB数据包时,您可以看到身份验证正常(如果是工作站,则为NTL​​M,如果是Windows 2008域,则为Kerberos),但RPC会将nca_s_fault_access_denied(0× 00000005)作为错误代码。

这意味着远程RPC组件无法执行请求的操作。这是因为在Windows Vista中,它默认情况下,不允许通过RPC在终端服务(远程桌面)上运行。要修改此设置以通过RPC启用远程桌面API,您需要找到以下注册表项:

HKLM \ SYSTEM \ CurrentControlSet \ Control \Terminal Server。

然后添加一个名为"AllowRemoteRPC"的DWORD值,并将其值更改为1。

谢谢
Anil Kumar Inampudi

 

3 rd 派对免责声明

3rd Party Disclaimer

 

注意 - 免责声明

此消息中的链接可能会导致第三方网站.Microsoft提供第三方资源以帮助您查找客户服务和/或技术支持资源。这些网站上的信息可能会更改,恕不另行通知。 Microsoft不对任何第三方网站上的内容负责,也不保证第三方信息的准确性。


这篇关于对远程PC的RPC调用被拒绝访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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