Create a new root user in ubuntu

To create a new root user in Ubuntu, you can follow these steps:

Method 1: Using the useradd command

  1. Open a terminal as the current user (not as root).

  2. Run the following command to create a new user:

    sudo useradd -m -s /bin/bash newroot

    Replace newroot with the desired username.

  3. Set a password for the new user:

    sudo passwd newroot

    Follow the prompts to set a password.

Method 2: Using the adduser command

  1. Open a terminal as the current user (not as root).

  2. Run the following command to create a new user:

    sudo adduser newroot

    Replace newroot with the desired username.

  3. Set a password for the new user:

    sudo passwd newroot

    Follow the prompts to set a password.

Method 3: Using the GUI

  1. Log in to the Ubuntu desktop.
  2. Click on the "Dash" icon in the top left corner and search for "Users".
  3. Click on "Users" to open the Users settings.
  4. Click on the "Unlock" button and enter your password.
  5. Click on the "Add User" button.
  6. Fill in the required information, including the username, password, and other details.
  7. Click on the "Add" button to create the new user.

Note: By default, the new user will not have root privileges. If you want to grant root privileges to the new user, you can use the sudo command to elevate their privileges. For example:

sudo usermod -aG sudo newroot

This will add the new user to the sudo group, allowing them to run commands with root privileges.