[SOLVED] I can't login as root after set selinux to enforcing

Support for security such as Firewalls and securing linux
Post Reply
mike.smith
Posts: 2
Joined: 2021/04/05 09:01:25

[SOLVED] I can't login as root after set selinux to enforcing

Post by mike.smith » 2021/04/05 09:20:22

hi there
I can't login as root after set state of selinux to enforcing (SELINUX=enforcing) in /etc/selinux/config file and reboot
I don't have GRUB boot loader to boot single user from it

mike.smith
Posts: 2
Joined: 2021/04/05 09:01:25

Re: I can't login as root after set selinux to enforcing

Post by mike.smith » 2021/04/05 13:23:44

I resolved my problem in this ways:
  • boot server from centos 7 boot image
  • select Troubleshooting from items menu
  • select Rescue a CentOS system from next menu
  • select continue
  • press Enter to get a shell
  • change root environment with this command: # chroot /mnt/sysimage
  • edit /etc/selinux/config file and change selinux mode to permissive
  • exit from root shell and reboot server

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: I can't login as root after set selinux to enforcing

Post by scottro » 2021/04/05 15:01:17

Thanks for coming back and letting us know how you fixed it. I'll marked the thread as solved.
New users should check the FAQ and Read Me First pages

Post Reply