From 5bc8a389f34c06655860bc15c4346e567bdc7c89 Mon Sep 17 00:00:00 2001 From: amyMaYun Date: Wed, 15 Apr 2020 11:34:39 +0800 Subject: [PATCH 1/4] =?UTF-8?q?rename=20SecHarden/=E7=A6=81=E6=AD=A2?= =?UTF-8?q?=E9=80=9A=E8=BF=87CTRL+ALT+DEL=E9=87=8D=E5=90=AF=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F.md=20to=20SecHarden/=E7=A6=81=E6=AD=A2=E9=80=9A?= =?UTF-8?q?=E8=BF=87Ctrl+Alt+Del=E9=87=8D=E5=90=AF=E7=B3=BB=E7=BB=9F.md.?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E5=AE=9E=E7=8E=B0=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...15\345\220\257\347\263\273\347\273\237.md" | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) rename "content/zh/docs/SecHarden/\347\246\201\346\255\242\351\200\232\350\277\207CTRL+ALT+DEL\351\207\215\345\220\257\347\263\273\347\273\237.md" => "content/zh/docs/SecHarden/\347\246\201\346\255\242\351\200\232\350\277\207Ctrl+Alt+Del\351\207\215\345\220\257\347\263\273\347\273\237.md" (44%) diff --git "a/content/zh/docs/SecHarden/\347\246\201\346\255\242\351\200\232\350\277\207CTRL+ALT+DEL\351\207\215\345\220\257\347\263\273\347\273\237.md" "b/content/zh/docs/SecHarden/\347\246\201\346\255\242\351\200\232\350\277\207Ctrl+Alt+Del\351\207\215\345\220\257\347\263\273\347\273\237.md" similarity index 44% rename from "content/zh/docs/SecHarden/\347\246\201\346\255\242\351\200\232\350\277\207CTRL+ALT+DEL\351\207\215\345\220\257\347\263\273\347\273\237.md" rename to "content/zh/docs/SecHarden/\347\246\201\346\255\242\351\200\232\350\277\207Ctrl+Alt+Del\351\207\215\345\220\257\347\263\273\347\273\237.md" index 3b5ad4c37..39234922e 100644 --- "a/content/zh/docs/SecHarden/\347\246\201\346\255\242\351\200\232\350\277\207CTRL+ALT+DEL\351\207\215\345\220\257\347\263\273\347\273\237.md" +++ "b/content/zh/docs/SecHarden/\347\246\201\346\255\242\351\200\232\350\277\207Ctrl+Alt+Del\351\207\215\345\220\257\347\263\273\347\273\237.md" @@ -6,14 +6,19 @@ ## 实现 -通过屏蔽内核keyboard中的“Ctrl+Alt+Del”响应函数解决。 +禁止通过“Ctrl+Alt+Del”重启系统的操作步骤如下: -``` -rm -f /etc/systemd/system/ctrl-alt-del.target -rm -f /usr/lib/systemd/system/ctrl-alt-del.target -``` +1. 删除两个ctrl-alt-del.target文件,参考命令如下: ->![](public_sys-resources/icon-note.gif) **说明:** ->如下文件保留的原因是XEN驱动需要调用,系统已无法响应“Ctrl+Alt+Del”操作,因此无影响: ->/usr/lib/systemd/system/ctrl-alt-del.target + ``` + rm -f /etc/systemd/system/ctrl-alt-del.target + rm -f /usr/lib/systemd/system/ctrl-alt-del.target + ``` + +2. 修改/etc/systemd/system.conf文件,将\#CtrlAltDelBurstAction=reboot-force修改为CtrlAltDelBurstAction=none。 +3. 重启systemd,使修改生效,参考命令如下: + + ``` + systemctl daemon-reexec + ``` -- Gitee From 9345ef3eee2b351563bb0bd8e94a3970eed7aa21 Mon Sep 17 00:00:00 2001 From: amyMaYun Date: Wed, 15 Apr 2020 11:35:43 +0800 Subject: [PATCH 2/4] =?UTF-8?q?update=20content/zh/docs/SecHarden/?= =?UTF-8?q?=E7=A6=81=E6=AD=A2=E9=80=9A=E8=BF=87Ctrl+Alt+Del=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E7=B3=BB=E7=BB=9F.md.=20=E4=BF=AE=E6=94=B9=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...+Alt+Del\351\207\215\345\220\257\347\263\273\347\273\237.md" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/content/zh/docs/SecHarden/\347\246\201\346\255\242\351\200\232\350\277\207Ctrl+Alt+Del\351\207\215\345\220\257\347\263\273\347\273\237.md" "b/content/zh/docs/SecHarden/\347\246\201\346\255\242\351\200\232\350\277\207Ctrl+Alt+Del\351\207\215\345\220\257\347\263\273\347\273\237.md" index 39234922e..5c96ecf9a 100644 --- "a/content/zh/docs/SecHarden/\347\246\201\346\255\242\351\200\232\350\277\207Ctrl+Alt+Del\351\207\215\345\220\257\347\263\273\347\273\237.md" +++ "b/content/zh/docs/SecHarden/\347\246\201\346\255\242\351\200\232\350\277\207Ctrl+Alt+Del\351\207\215\345\220\257\347\263\273\347\273\237.md" @@ -1,4 +1,4 @@ -# 禁止通过CTRL+ALT+DEL重启系统 +# 禁止通过Ctrl+Alt+Del重启系统 ## 说明 -- Gitee From 2b77958980ca54e68685c6130d364b97b4b8a6d1 Mon Sep 17 00:00:00 2001 From: amyMayun Date: Wed, 15 Apr 2020 11:48:08 +0800 Subject: [PATCH 3/4] modify secHarden doc of ctrl+alt+del method --- content/zh/menu/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/zh/menu/index.md b/content/zh/menu/index.md index 662caa604..ba6f62a9a 100644 --- a/content/zh/menu/index.md +++ b/content/zh/menu/index.md @@ -320,7 +320,7 @@ headless: true - [加固内核参数]({{< relref "./docs/SecHarden/加固内核参数.md" >}}) - [授权认证]({{< relref "./docs/SecHarden/授权认证.md" >}}) - [设置网络远程登录的警告信息]({{< relref "./docs/SecHarden/设置网络远程登录的警告信息.md" >}}) - - [禁止通过CTRL+ALT+DEL重启系统]({{< relref "./docs/SecHarden/禁止通过CTRL+ALT+DEL重启系统.md" >}}) + - [禁止通过Ctrl+Alt+Del重启系统]({{< relref "./docs/SecHarden/禁止通过Ctrl+Alt+Del重启系统.md" >}}) - [设置终端的自动退出时间]({{< relref "./docs/SecHarden/设置终端的自动退出时间.md" >}}) - [设置用户的默认umask值为077]({{< relref "./docs/SecHarden/设置用户的默认umask值为077.md" >}}) - [设置GRUB2加密口令]({{< relref "./docs/SecHarden/设置GRUB2加密口令.md" >}}) -- Gitee From aedec0efa43784a5de0ea425e030b74abe7d1f05 Mon Sep 17 00:00:00 2001 From: amyMaYun Date: Wed, 15 Apr 2020 18:54:09 +0800 Subject: [PATCH 4/4] update forestalling-unauthorized-system-restart-by-holding-down-ctrl-alt-and-delete.md. https://gitee.com/openeuler/docs/issues/I1D97R?from=project-issue --- ...art-by-holding-down-ctrl-alt-and-delete.md | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/content/en/docs/SecHarden/forestalling-unauthorized-system-restart-by-holding-down-ctrl-alt-and-delete.md b/content/en/docs/SecHarden/forestalling-unauthorized-system-restart-by-holding-down-ctrl-alt-and-delete.md index 612910b32..4e95c85df 100644 --- a/content/en/docs/SecHarden/forestalling-unauthorized-system-restart-by-holding-down-ctrl-alt-and-delete.md +++ b/content/en/docs/SecHarden/forestalling-unauthorized-system-restart-by-holding-down-ctrl-alt-and-delete.md @@ -6,16 +6,19 @@ By default, you can restart the OS by holding down **Ctrl**, **Alt**, and **D ## Implementation -Shield the **Ctrl+Alt+Del** response function of the kernel keyboard. +To disable the feature of restarting the system by holding down **Ctrl**, **Alt**, and **Delete**, perform the following steps: -``` -rm -f /etc/systemd/system/ctrl-alt-del.target -rm -f /usr/lib/systemd/system/ctrl-alt-del.target -``` +1. Run the following commands to delete the two **ctrl-alt-del.target** files: -   + ``` + rm -f /etc/systemd/system/ctrl-alt-del.target + rm -f /usr/lib/systemd/system/ctrl-alt-del.target + ``` ->![](public_sys-resources/icon-note.gif) **NOTE:** ->The following file is reserved because the Xen driver needs to be invoked and the system cannot respond to the **Ctrl+Alt+Del** operation. Therefore, there is no impact. ->/usr/lib/systemd/system/ctrl-alt-del.target +2. Change **\#CtrlAltDelBurstAction=reboot-force** to **CtrlAltDelBurstAction=none** in the **/etc/systemd/system.conf** file. +3. Run the following command to restart systemd for the modification to take effect: + + ``` + systemctl daemon-reexec + ``` -- Gitee