ssh登陆到终端的时候去掉Your default context is root提示
使用ssh或者telnet登陆到终端的时候,发现有的机器会有如下的提示:
[local@2hei.net ~]$ su –
Password:
Your default context is root:system_r:unconfined_t.
Do you want to choose a different one? [n]
[root@2hei.net ~]# getenforce
Permissive
解决办法一:
[root@2hei.net ~]# vi /etc/pam.d/su
session required /lib/security/$ISA/pam_selinux.so open multiple
改成
session required /lib/security/$ISA/pam_selinux.so open
解决办法二:
vi /etc/selinux/config
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – SELinux is fully disabled.
将
SELINUX=permissive
改成
SELINUX=disabled
重启系统或者使用以下命令使SElinux生效
setenforce 0
使用getenforce查看结果是否生效
本文固定链接: https://www.2hei.net/2009/07/15/your_default_context_is_root/ | 2hei.net
最活跃的读者