Centos7.4 修改selinux错误导致服务器起不来

[[email protected] ~]# cat /etc/selinux/config 

# 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 - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 

[[email protected] ~]# vi /etc/selinux/config    

# 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 - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=disabled  

~
"/etc/selinux/config" 14L, 547C written
[[email protected] ~]#
[[email protected] ~]#
[[email protected] ~]#
[[email protected] ~]# reboot 

解决方法:

1、重启Linux按e进入系统启动项修改参数

2、在linux16的行位添加 selinux=0

按ctrl + x之后启动linux系统

3、启动之后修改/etc/selinux/config文件

原文地址:https://www.cnblogs.com/shwang/p/12012646.html

时间: 2024-07-29 08:50:14

Centos7.4 修改selinux错误导致服务器起不来的相关文章

centos7 修改selinux 开机导致 faild to load SELinux policy freezing 错误

centos7 修改selinux 开机导致 faild to load SELinux policy  freezing 错误 之前把selinux关闭了,这次想打开selinux,于是修改了 /etc/selinux/config 文件,然后重启时,就开不了机了, 出现错误:faild to load SELinux policy  freezing,查了一些资料,完善方案 1. 重启时在启动页面 按 E, 进入 grub 编辑页面: 2. 找到 linux 那一行,在最后 language

.net框架错误导致服务器错误,安全策略不允许操作,权限不足

“/”应用程序中的服务器错误. 安全性异常 说明: 应用程序尝试执行安全策略不允许的操作.要授予此应用程序所需的权限,请与系统管理员联系,或在配置文件中更改该应用程序的信任级别. 异常详细信息: System.Security.SecurityException: System.Security.Permissions.SecurityPermission 源错误: 执行当前 Web 请求期间生成了未经处理的异常.可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息. 堆栈跟踪: [S

EDAC DIMM CE Error错误导致服务器重启

现象: 最近几天一个华为RH2285服务器一直不定时自动重启,基本每天一两次,查看系统日志报下面的错误,每秒记录一条错误日志 OS:OEL 6.5 $ more /var/log/message Jul 21 08:54:32 customerkernel: EDAC MC1: 5486 CE error on CPU#1Channel#2_DIMM#1 (channel:2 slot:1page:0x0 offset:0x0 grain:8 syndrome:0x0) Jul 21 08:54

selinux配置文件修改错误导致无法启动虚拟机

selinux配置文件修改错误导致无法启动虚拟机 问题 [[email protected] ~]# cat /etc/selinux/config # 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 - SELin

修改DNS域名转发器解决IP地址解析错误导致的网站不能访问

修改DNS域名转发器解决IP地址解析错误导致的网站不能访问 首先谢谢同事林路的指导,才能顺利解决问题 打开网站,访问一个域名,DNS解析到错误的IP地址,那么将不能正确访问该网站 1.使用8.8.8.8(google 公用dns定位本地dns解析和google解析),这里是zh.wikipedia.org ping zh.wikipedia.org     159.106.121.75(这个是很多dns异常解析的地址) nslookup -qt zh.wikipedia.org 8.8.8.8

linux异常处理:selinux配置错误导致无法重启

点击返回自学Linux集锦 linux异常处理:selinux配置错误导致无法重启 一次linux无法重启异常记录: 当时第一反应就是梳理最近的配置变更,特别是能预知相关的就是selinux配置变更. 原来是误将SELINUXTYPE看成SELINUX后,将其值改为disabled.导致操作系统服务启动,无法进入单用户模式.变更回来之后,一切正常. 解决方法一: 系统启动的时候,按下'e'键进入grub编辑界面,编辑grub菜单,使用上下键选择"kernel " 一行,按'e'键进入编

Linux的SElinux可能导致的服务器异常的研究

今天先写现象: 某台服务器由于误操作启动了SELinux,导致了服务器无法登陆,原有用户名口令全部失效.再关闭SElinux后,恢复正常. 我现在的好奇在于,SElinux基于什么样的原理阻止了单用户模式下的passwd命令执行. SELiunx原理: 通过一个在linux内核外挂的模块LSM(Linux Security Modules),在原生linux的权限管理后增加了一个钩子(hook),在原生权限检查后,通过这个钩子增加了SELinux的策略检查.通过这个被称为类型强制的机制,可以进行

CentOS7:搭建SVN + Apache 服务器

CentOS7:搭建SVN + Apache 服务器 1. 安装httpd 安装httpd服务: $ sudo yum install httpd 检查httpd是否安装成功: $ httpd -version Server version: Apache/2.4.6 (CentOS) Server built:   Jul 18 2016 15:30:14 2. 安装svnserve 安装svnserve服务: $ sudo yum install subversion 检查svnserve是

Nginx 因 Selinux 服务导致无法远程访问

本文暂且叫这个名吧,因为不是很理解 Selinux ,也许你有更好的办法请告知我! 一.问题现象 Nginx 启动后本机可以正常访问,使用Curl 命令可以获取默认 index.html,其他界面均不可访问.远程访问服务器时提示 400 bad request 信息,检查Nginx用户权限和端口都正常,iptables 未启动. # curl -I localhost HTTP/1.1 200 OK Server: nginx Date: Mon, 15 Dec 2014 10:52:34 GM