ssh登陆到终端的时候去掉Your default context is root提示

作者: 2hei 发表于2009年7月15日 03:20
版权声明: 可以转载, 转载时务必以超链形式标明文章原始出处和作者信息及版权声明
http://www.2hei.net/mt/2009/07/your-default-context-is-root.html
使用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查看结果是否生效

| | Comments (0) | TrackBacks (0)

发表一个评论

关于这篇文章

这篇文章由2hei2009年7月15日 03:20发布.

上一篇:linux限制用户密码尝试次数

下一篇:linux下使用uuencode/mutt发送带附件的邮件

回到首页 或者查看归档文章