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 - 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] ~]# cat  /etc/selinux/config ^C
[[email protected] ~]# getenforce
Enforcing
[[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=disabled 

[[email protected] ~]# reboot 

Connection closed by foreign host.

Disconnected from remote host(10.0.0.73:22) at 16:56:13.

Type `help‘ to learn how to use Xshell prompt.
[c:\~]$ 

解决办法

重启,但是会比较慢,要等好几分钟

默认是单用户模式

[[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=disabled
# 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] ~]# getenforce
Disabled
[[email protected] ~]# setenforce  1
setenforce: SELinux is disabled
[[email protected] ~]# echo  123456  |  passwd --stdin root
Changing password for user root.
passwd: all authentication tokens updated successfully.

注意此文件不需要修改

[[email protected] ~]# cat  /boot/grub2/grub.cfg  |  grep  linux16
    linux16 /vmlinuz-3.10.0-862.el7.x86_64 root=UUID=154fb900-77cf-4d55-975f-b788805fe281 ro rhgb quiet   net.ifnames=0  biosdevname=0
    linux16 /vmlinuz-0-rescue-581a9982f0474ce5bc2d9ba036f3bc8a root=UUID=154fb900-77cf-4d55-975f-b788805fe281 ro rhgb quiet   net.ifnames=0  biosdevname=0 

原文地址:https://www.cnblogs.com/wang618/p/12012494.html

时间: 2024-11-08 11:10:53

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

eclipse启动tomcat,突然出现 fail to start错误,导致不能启动

尝试了 1.重新安装tomcat 2.重新在eclipse中配置tomcat服务器 都没能解决 ===================================== 最后看了一个外文的问答页,其中一个回答让仔细检查web.xml文件 肉眼还是看不出什么问题,但是把最后配置的一个servlet重新配一下就好了 注意:在配置web.xml的时候要按照xml的约束规则 排列各个标签的出现顺序 eclipse启动tomcat,突然出现 fail to start错误,导致不能启动,布布扣,bubu

Eclipse错误导致无法启动The workspace exited with unsaved changes in the previous session

MyOpenSUSE:/home/jin/workspace # tail -f .metadata/.log !SESSION 2014-05-04 11:35:58.869 -----------------------------------------------eclipse.buildId=4.3.2.M20140221-1700java.version=1.7.0_51java.vendor=Oracle CorporationBootLoader constants: OS=li

MySQL安装过程启动mysqld_safe中提示的pid ended错误导致无法启动问题处理

执行Mysqld --initialize --user=mysql后,初始化没有问题 在执行mysqld_safe --user=mysql &启动时,shell提示如下 然后 ps -ef | grep mysql 发现并没有mysqld进程存在,判断为Mysqld进程根本没有启动成功 检查错误日志 cat error.log 发现如下错误信息    问题出在系统无法找到unix套接字文件/tmp/mysql/sock 4.多次重新初始化后,仍然出现此错误.怀疑可能是之前空间满导致无法启动时

vmware Selinux配置错误,导致无法启动虚拟机

Linux 开机提示kernel panic - not syncing: Attempted to kill init! 解决方法: 系统启动的时候,按下‘e’键进入grub编辑界面,编辑grub菜单,选择“kernel /vmlinuz-2.6.23.1-42.fc8 ro root=/dev/vogroup00/logvol00 rhgb quiet” 一栏,按‘e’键进入编辑,在末尾增加enforcing=0,即: kernel /vmlinuz-2.6.23.1-42.fc8 ro r

初始化参数文件修改错误导致Oracle无法startup

1.修改初始化文件为错误的值 --错误的修改 SQL> alter system set db_block_buffers=1000 scope=spfile; 系统已更改. SQL> shutdown immediate 数据库已经关闭. 已经卸载数据库. ORACLE 例程已经关闭. SQL> startup ORA-00824: cannot set SGA_TARGET or MEMORY_TARGET due to existing internal settings ORA-

ubuntu 修改environment导致无法启动

给ubuntu安装idk maven时修改了environment,想在此配置jdk maven.但是到用户输入密码界面输入密码后无法进入桌面. 解决方法: 1.按ctrl+alt+f1进入命令提示符界面 在此界面会发现常用命令 如 ls vi sudo等都无法使用,这是因为environment出错导致它配置的环境变量失效,想要使用得使用全路径 如:/usr/bin/sudo 2.删除添加的内容 /usr/bin/sudo /usr/bin/vi /etc/environment 3.重启后便

centos 7.3 错误设置selinux 导致不能启动 Failed to load SELinux policy. Freezing

错误原因 配置关闭SELinux,结果误操作 应修改配置文件/etc/selinux/config中的"SELINUX"参数的值,# SELINUX=enforcing  原始配置SELINUX=disabled     正确 但是误将"SELINUXTYPE"看成"SELINUX",设置了SELINUXTYPE参数:#SELINUXTYPE=targeted   原始配置 这个不必修改.SELINUXTYPE=disabled   错误 错误结

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

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 o