Remove Root User in Proxmox

2 min read 4 hours ago
Published on Nov 24, 2024 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

Introduction

This tutorial will guide you through the process of removing the root user from your Proxmox server. Disabling the root user enhances the security of your server by minimizing the risk of unauthorized access. Following these steps will help you create a more secure environment for your virtual machines.

Step 1: Create a New User

Before removing the root user, you need to create a new user with administrative privileges.

  1. Log in to your Proxmox web interface.
  2. Navigate to the Datacenter section.
  3. Click on the Users tab.
  4. Click on the Add button to create a new user.
  5. Fill in the following details:
    • User ID: Choose a username (e.g., admin).
    • Password: Set a strong password.
    • Realm: Select PAM.
  6. Click Add to create the user.

Step 2: Assign Permissions to the New User

Now that you have a new user, you need to grant it the necessary permissions.

  1. Go to the Datacenter section again.
  2. Click on the Permissions tab.
  3. Click on Add and select User Permission.
  4. In the dialog, set the following:
    • User: Select the user you just created.
    • Path: Choose Datacenter.
    • Role: Assign Administrator to the user.
  5. Click Add to apply the permissions.

Step 3: Disable the Root User

With a new user set up and permissions assigned, you can safely disable the root user.

  1. Open the terminal or SSH into your Proxmox server.
  2. Run the following command to lock the root account:
    passwd -l root
    
  3. To confirm the root user is disabled, attempt to log in with the root credentials.

Step 4: Test Access with the New User

After disabling the root account, test your new user credentials to ensure everything is functioning correctly.

  1. Log out of the Proxmox web interface.
  2. Attempt to log in with the new user account you created.
  3. Verify that you have access to all necessary features and functions.

Conclusion

By following these steps, you have successfully removed the root user from your Proxmox server, thereby increasing its security. Always remember to keep your user credentials secure and regularly update your passwords. Consider additional security measures, such as two-factor authentication, for further protection.