ITPub博客

首页 > 自动化运维 > 大规模网络运维 > [20200323]避免按ctrl+alt+del重新启动服务器(centos 7).txt

[20200323]避免按ctrl+alt+del重新启动服务器(centos 7).txt

原创 大规模网络运维 作者:lfree 时间:2020-03-23 11:06:12 0 删除 编辑

[20200323]避免按ctrl+alt+del重新启动服务器(centos 7).txt

--//想在centos 7关闭按ctrl+alt+del重新启动服务器的功能,检查发现与centos 6不同。
--//链接:http://blog.itpub.net/267265/viewspace-2638238/ => [20190313]避免按ctrl+alt+del重新启动服务器.txt

#  ls -l  /etc/systemd/system/ctrl-alt-del.target
ls: cannot access /etc/systemd/system/ctrl-alt-del.target: No such file or directory

# systemctl mask ctrl-alt-del.target
Created symlink from /etc/systemd/system/ctrl-alt-del.target to /dev/null.

# ls -l  /etc/systemd/system/ctrl-alt-del.target
lrwxrwxrwx. 1 root root 9 Mar 23 10:55 /etc/systemd/system/ctrl-alt-del.target -> /dev/null

--//反转执行systemctl unmask ctrl-alt-del.target,实际上这样并不阻止按键,仅仅导致操作不会重启服务器。
--//在GUI下:

# gsettings get org.gnome.settings-daemon.plugins.media-keys logout
'<Control><Alt>Delete'

Disabling for all users

1. Create a file under the directory '/etc/dconf/db/local.d/' with the settings to be applied globally. For example:

# cat /etc/dconf/db/local.d/00-disable-CAD
[org/gnome/settings-daemon/plugins/media-keys]
logout=''

2. Update the dconf settings:

# dconf update

Verify if the 'ctrl-alt-del' key combination is disabled globally.

# gsettings get org.gnome.settings-daemon.plugins.media-keys logout
''


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/267265/viewspace-2682012/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    2669
  • 访问量
    6427902