zoukankan      html  css  js  c++  java
  • Windows 2008 R2 远程桌面服务(八)远程桌面服务器安全设置

    1) 开始—运行,输入tsconfig.msc,打开远程桌面主机会话配置。右键RDP-Tcp,属性。

     


    “常规”选项卡,安全性,安全层更改为“SSL (TLS 1.0)”,加密级别设为“高”。

    (2) 开始—运行,输入“gpedit.msc”,打开本地组策略编辑器。

    计算机配置\管理模板\Windows 组件\远程桌面服务\远程桌面会话主机\远程会话环境

    从“关机”对话框删除“断开连接”选项

    ●启用     在“关机”对话框中删除“关机”和重新启动。以防止不熟悉的管理员意外把远程桌面服务器关机或重启。

    ●禁用     “关机”对话框无改变

    这个功能非常有用,特别是公司的域管理员比较多时,你负责远程桌面服务器的管理,你不想别的管理员因为不小心把这台服务器关闭时,可以启用此选项。不过这并不影响你使用命令来关机和重启。

    重启服务器命令:shutdown –r -f –t 0 (强制计算机立即重启)

    关闭服务器命令:shutdown –s -f –t 0 (强制计算机立即关机)

    (3) 更改控制面板类文件的权限

    ● 取得c:\windows\system32\*.msc文件的所有权为administrats组。在目录c:\windows\system32\*.msc默认的文件所有者为TrustedInstaller。

    takeown /F c:\windows\system32\*.msc /A

    注意:运行这个命令必须以本地计算机的administrator帐号运行才能成功。如果以域管理员运行,即使加入了本地管理员组,执行命令显示成功,也不能取得文件所有者。

    ● 删除c:\windows\system32\*.msc文件的的所有权限。

    我使用Xcacls.vbs脚本来删除Users组对c:\windows\system32\*.msc文件的所有权限,使用方法及下载,请看我的博客文章:

    http://hi.baidu.com/longx5/blog/item/9ba3ce57c9970eceb645ae4b.html

    批处理命令:

    for /R c:\windows\system32 %i in (*.msc) do cscript d:\xcacls.vbs %i /E /R "BUILTIN\users"

    出现下面的错误提示:

    Starting XCACLS.VBS (Version: 5.2) Script at 2009/12/31 13:57:19

    ************************************************

    * Script not tested on this version of Windows *

    ************************************************

    This script hasn't been tested on version "6.1" of Windows.

    Currently, the script has been tested on the following:

                Win2000, WinXP, Win2003

    Previous versions of Windows NT can use:

    "XCACLS.EXE" from the NT 4.0 Resource Kit.

    For more recent versions, there may be an update to this script.

    Please contact David Burrell (dburrell@microsoft.com)

    Note: WMI must be installed for this script to function.

    If you need to run this script on the current OS,

    and you verified WMI is installed, do the following:

                open this script in Notepad

                search for Function IsOSSupported()

                change this line:

                            Case "5.0", "5.1", "5.2"

                to:

                            Case "5.0", "5.1", "5.2", "6.1"

                Save the script.

    Exiting script now.

    Operation Complete

    Elapsed Time: .078125 seconds.

    Ending Script at 2009/12/31 13:57:19

        看上面的提示:我们知道Xcacls.vbs在编写时只有Win2000, WinXP, Win2003,因此对于Win2008不认识,提示中指明了修改的方法:

       编辑文件Xcacls.vbs,查找Function IsOSSupported(),把这一行Case "5.0", "5.1", "5.2"更改为Case "5.0", "5.1", "5.2", "6.1"。这样Xcacls.vbs就可以识别Win2008了。

        Xcacls.vbs也可以对整个文件夹或者磁盘的用户权限进行修改,但对于一个目录及子目录下特定的一组文件进行权限修改无效,因此使用了for命令递归实现。For命令的参数,好多文章中都写了应该使用%%i,但在命令行执行时会提示:“此时不应该有%%i”,把%%i更改为%i就可以。如果在一个批处理文件中使用%%i也是可以的,读者可以自己测试。

  • 相关阅读:
    Django: 获取头信息
    好用工具:火狐浏览器的境内境外版本区分
    Django: request.GET.get()
    es6: 展开运算符
    Vue: 配置axios基准路径并使用
    js: 获取Blob的值
    ApiPost: Error:ESOCKETTIMEDOUT
    Vue错误:Cannot read properties of undefined (reading '$router')
    git报错:error: Your local changes to the following files would be overwritten by checkout:
    Django: request.query_params取值
  • 原文地址:https://www.cnblogs.com/lxshanye/p/2889602.html
Copyright © 2011-2022 走看看