Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by mokkan
at 2024-08-08 07:42:47
Point:500 Replies:9 POST_ID:828715USER_ID:11612
Topic:
Linux;;Unix Operating Systems
Hello,
If we disable or enable selinux. Do we need to reboot the server?
If we disable or enable selinux. Do we need to reboot the server?
Author: mokkan replied at 2024-08-11 16:35:07
Thanks a lot.
Accepted Solution
Expert: _jesper_ replied at 2024-08-08 14:41:01
84 points EXCELLENT
The idea behind 'setenforce' is that is does not require a reboot.
Assisted Solution
Expert: Mazdajai replied at 2024-08-08 14:23:20
83 points EXCELLENT
To clarify post 39393785 -
setenforce 0 put it in Permissive but not disable it. Edit /etc/selinux/config and reboot the system to disable it. It is recommended to put it in permissive instead. (setenforce 0)
setenforce 0 put it in Permissive but not disable it. Edit /etc/selinux/config and reboot the system to disable it. It is recommended to put it in permissive instead. (setenforce 0)
$ less /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 these two values:# targeted - Targeted processes are protected,# mls - Multi Level Security protection.SELINUXTYPE=targeted 1:2:3:4:5:6:7:8:9:10:11:12:
Assisted Solution
Expert: _jesper_ replied at 2024-08-08 10:29:40
83 points EXCELLENT
setenforce 1 => enables
setenforce 0 => disables
'getenforce' gives you the status.
setenforce 0 => disables
'getenforce' gives you the status.
Author: mokkan replied at 2024-08-08 08:35:45
I changed it and still showing as enabled.
[root@server3 ~]# echo 0 > /selinux/enforce
[root@server3 ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: permissive
Policy version: 24
Policy from config file: targeted
[root@server3 ~]# setenfroce 0
-bash: setenfroce: command not found
[root@server3 ~]# setenforce 0
[root@server3 ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: permissive
Policy version: 24
Policy from config file: targeted
[root@server3 ~]# echo 0 > /selinux/enforce
[root@server3 ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: permissive
Policy version: 24
Policy from config file: targeted
[root@server3 ~]# setenfroce 0
-bash: setenfroce: command not found
[root@server3 ~]# setenforce 0
[root@server3 ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: permissive
Policy version: 24
Policy from config file: targeted
Assisted Solution
Expert: _jesper_ replied at 2024-08-08 08:29:07
83 points EXCELLENT
When I've used that command, it's immediate.
Author: mokkan replied at 2024-08-08 08:24:09
once you enabled on live system, by using setenforce 1, would it affect right a way? need few hours to complete?
Assisted Solution
Expert: _jesper_ replied at 2024-08-08 08:20:50
83 points EXCELLENT
Use 'setenforce' to change your running status.
Assisted Solution
Expert: duncanb7 replied at 2024-08-08 07:49:46
84 points EXCELLENT
Hope it will help , both article said need to reboot
http://www.revsys.com/writings/quicktips/turn-off-selinux.html
http://www.crypt.gen.nz/selinux/disable_selinux.html
http://www.revsys.com/writings/quicktips/turn-off-selinux.html
You will need to reboot your system or temporarily set SELinux to non-enforcing mode to create the desired effect like the example above.
http://www.crypt.gen.nz/selinux/disable_selinux.html
You will have to reboot to disable SELinux, you just can't do it while the system is running.