This rule emphasizes avoiding the 'root' user for administrative and daily tasks.
Rule | Eliminate use of the 'root' user for administrative and daily tasks |
Framework | cis_v150 |
Severity | ✔ Medium |
Rule Description
The rule "Eliminate use of the 'root' user for administrative and daily tasks" is designed to enhance the security of the system by minimizing the use of the 'root' user account. The 'root' user has unrestricted access to the entire system and its resources, making it a high-value target for attackers. Limiting the use of the 'root' user reduces the risk of unauthorized access and potential system compromises.
Troubleshooting Steps
If this rule is enforced and there are issues with user access or administrative tasks, follow these troubleshooting steps:
Necessary Codes
No specific code is provided for this rule.
Remediation Steps
To comply with this rule, follow these step-by-step guide for remediation:
Create a new user account with administrative privileges:
Replacesudo adduser <username>
<username>
with a desired username for the new administrative account.Grant administrative privileges to the new user account:
This gives the new user account the ability to execute commands with elevated privileges.sudo usermod -aG sudo <username>
Test the new administrative account:
Remove 'root' access for daily tasks:
sudo nano /etc/ssh/sshd_config
PermitRootLogin no
Restart the SSH service to apply the changes:
sudo service ssh restart
Update any scripts or workflows to use the new administrative account instead of 'root':
Provide necessary access to other users as required:
By following these steps, you can eliminate the use of the 'root' user for administrative and daily tasks, thereby enhancing the security of your system.