getsebool -aSince SELinux settings don't really have catchy names, your best bet is using grep in conjunction with the -a switch, e.g to find all SELinux settings related to ssh:
getsebool -a | grep sshYou can now use the setsebool command to change the settings like this:
setsebool -P selinuxsetting booleanwhere boolean is 1 to switch on and 0 to switch off.
Alternatively, you could you use tooglesebool, which flips the value.
e.g.
[root@centos1 examples]# getsebool -a | grep virt_use_nfs
virt_use_nfs --> off
[root@centos1 examples]# togglesebool virt_use_nfs
virt_use_nfs: active
[root@centos1 examples]# getsebool -a | grep virt_use_nfs
virt_use_nfs --> on
You forgot to include togglesebool.
ReplyDeleteI must admit that I wasn't aware of this command, thanks for pointing it out.
Delete