文章来源:
http://www.2hei.net/mt/2009/07/your-default-context-is-root.html
[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查看结果是否生效
[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查看结果是否生效