Re: How do you reset Selinux back to default?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/13/2018 07:53 AM, Samuel Sieb wrote:
> On 03/12/2018 06:28 PM, ToddAndMargo wrote:
>> I mean before I started adding things to SELinux based on
>> SEAlerts and such.  In other word, set SELinux back to
>> the way I found it after I installed Linux
> 
> I thought I had seen something to list changed modules, but now I think
> I misunderstood.  I think the easiest way would be to find a clean
> install somewhere and list the installed modules there.  Then you can do
> a diff with your system and remove the modules are extra.
> _______________________________________________
> users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx

Hi,

To "reset" SELinux on your system please remove all "non-system" modules:

# semodule -lfull | grep -v 100  # this gives you list of non system
SELinux modules
# semodule -r <modulename> # this will remove it

Then there is semanage command:

# cat reset_selinux.txt
boolean -D
login -D
interface -D
user -D
port -D
node -D
fcontext -D
module -D

# semanage import -f reset_selinux.txt
#

# restorecon -Rv /

This will remove all local SELinux modules and reset your local
modifications.

Lukas.

-- 
Lukas Vrabec
Software Engineer, Security Technologies
Red Hat, Inc.

Attachment: 0x633F6955.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux