Articles on: ggRock

🔓 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


  1. Edit the disallowed-users file

Open the file with a text editor using root privileges:


   sudo nano /etc/cockpit/disallowed-users
  1. Remove the root line

If you see a line that contains only:


   root


comment out that line:


   # root
  1. Save the changes


  • In Nano, press Ctrl+X, then Y, then Enter to save and exit.
  1. 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

Was this article helpful?

Share your feedback

Cancel

Thank you!