Lab Information
Following a security audit, the xFusionCorp Industries security team has opted to enhance application and server security with SELinux. To initiate testing, the following requirements have been established for App server 1 in the Stratos Datacenter:
Install the required SELinux packages.
Permanently disable SELinux for the time being; it will be re-enabled after necessary configuration changes.
No need to reboot the server, as a scheduled maintenance reboot is already planned for tonight.
Disregard the current status of SELinux via the command line; the final status after the reboot should be disabled.
Lab Solutions
π§ Part 1: Lab Step-by-Step Guidelines
πΉ Step 1: Log in to Jump Host
ssh thor@jump_host.stratos.xfusioncorp.com
Password:
mjolnir123
πΉ Step 2: SSH into App Server 1
ssh tony@stapp01.stratos.xfusioncorp.com
Password:
Ir0nM@n
πΉ Step 3: Switch to root
sudo -i
π Install Required SELinux Packages
On RHEL/CentOS-based systems, install:
yum install -y selinux-policy selinux-policy-targeted policycoreutils
π§ Permanently Disable SELinux
πΉ Step 4: Edit SELinux config file
Open:
vi /etc/selinux/config
Find:
SELINUX=enforcing
Change it to:
SELINUX=disabled
Save and exit.
πΉ Step 5: Verify configuration file
grep ^SELINUX= /etc/selinux/config
Expected output:
SELINUX=disabled
β Important
Do NOT reboot.
Lab explicitly states:
No reboot required
Ignore current runtime status
Only final state after reboot must be disabled
β Final Checklist
β SELinux packages installed
β /etc/selinux/config modified
β SELINUX=disabled set
β No reboot performed
β Completed on App Server 1 only
π§ Part 2: Simple Step-by-Step Explanation (Beginner Friendly)
πΉ What is SELinux?
SELinux (Security-Enhanced Linux) adds:
Mandatory Access Control (MAC)
Fine-grained permission enforcement
Additional security layer beyond standard Unix permissions
πΉ Why install packages first?
Some systems may not have full SELinux utilities installed.
Installing ensures:
Configuration files exist
Required policies are present
Future re-enablement works correctly
πΉ What does SELINUX=disabled do?
This tells the system:
After next reboot, do not load SELinux.
Current runtime state does not matter.
Only config file matters for the lab.
πΉ Why no reboot?
Because:
Maintenance reboot is scheduled later
Lab checker reads configuration file, not runtime state
π Real-World Context
In production:
SELinux is usually set to enforcing
During migrations/testing, it may be temporarily disabled
Permanent disable requires reboot to take effect
Top comments (0)