Linux安全网 - Linux操作系统_Linux 命令_Linux教程_Linux黑客

会员投稿 投稿指南 本期推荐:
搜索:
您的位置: Linux安全网 > Linux培训 > » 正文

linux下禁用SELinux

来源: chenzhou123520 分享至:

如何开启或关闭SELinux

RedHat的 /etc/sysconfig/selinux

在新版本中的Red Hat 和 Fedora 上,修改档案/etc/sysconfig/selinux:

# This file controls the state of SELinux on the system.

# 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=enforcing

# SELINUXTYPE= type of policy in use. Possible values are:

# targeted - Only targeted network daemons are protected.

# strict - Full SELinux protection.

SELINUXTYPE=targeted

把 SELINUX设定为disable, 下次启动系统后将会停止SElinux。

Linux核心参数(Kernel Parameter)

或者可以在核心参数后加上: selinux=0 (停止) 或 selinux=1 (开启)参数

档案/boot/grub/menu.lst

title Fedora Core (2.6.18-1.2798.fc6)

root (hd0,0)

kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=LABEL=/ rhgb quiet selinux=0

initrd /initrd-2.6.18-1.2798.fc6.img

检查SELinux现时况态

要知到你现在是否使用 SELinux:

# getenforce

disabled



Tags:
分享至:
最新图文资讯
1 2 3 4 5 6
验证码:点击我更换图片 理智评论文明上网,拒绝恶意谩骂 用户名:
关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 发展历史