🔓 Enabling Root Login in Debian Control Panel (Debian 12)
By default, Cockpit restricts root user logins via the disallowed-users list. To allow root access, you'll need to remove the root entry from this file.
✅ Steps to Enable Root Login
- Edit the disallowed-users file
Open the file with a text editor using root privileges:
sudo nano /etc/cockpit/disallowed-users
- Remove the
rootline
If you see a line that contains only:
rootcomment out that line:
# root- Save the changes
- In Nano, press
Ctrl+X, thenY, thenEnterto save and exit.
- Restart the Cockpit service
For the changes to take effect, restart Cockpit:
sudo systemctl restart cockpit(Rebooting the system is optional but not typically necessary.)
⚠️ Important Considerations
- 🔐 Security Risks
Enabling root login increases the attack surface. It's safer to use a non-root user with sudo privileges for daily tasks.
- 🔑 Alternative Authentication
Consider implementing Kerberos, SSH keys, or certificates for more secure authentication.
- 🧱 Firewall Access
Make sure your firewall allows traffic on TCP port 9090, which Cockpit uses.
- 👤 Managing Other Users
You can restrict additional users by adding their usernames (one per line) to /etc/cockpit/disallowed-users.
Updated on: 10/12/2025
Thank you!
