New user with root access in Linux Debian

48,692

Solution 1

You don't want to do that. Use sudo, instead.

On recent versions of Ubuntu, the default group that is allowed to elevate using sudo is (appropriately) named "sudo". You can add the user by using usermod (or your graphical interface, which sadly I don't know anything about, or I would try to give you instructions for that).

usermod -a -G sudo new_user

Have the new user log in again. They should be able to sudo to other users after that.

Solution 2

root - there can be only one.

(but root can have multiple names).

To create an account with the same priviledges as root, just make the UID of the account equal to zero. Then they will be root, but with a different name.

Common examples of this are account names like toor which are created (e.g. on some *bsd systems) with UID 0, as an alternative root login - perhaps with /bin/csh rather than /bin/sh as the shell or some other frivolous reason.

However, as several people have already said, you do not want to do this. You may think you do, but you really don't. Install and configure sudo instead.

Solution 3

You'd want to use the terminal. To give full root access, get to the root account:

su

After that, open the sudoers file:

visudo

Then, add your username to the list:

username ALL=(ALL) ALL

After that, you should've given the user full root access.

Share:
48,692
Silviaa
Author by

Silviaa

Updated on September 18, 2022

Comments

  • Silviaa
    Silviaa over 1 year

    I've created a new user by using "User Accounts" in "System Settings". How do I grant rights so that this new user can have the same level of access as root?

    • 41754
      41754 over 10 years
      You tell the new user the root password?
    • The Spooniest
      The Spooniest over 10 years
      Why do you want to do this? It's usually not a good idea to just give another user the same access as root, which is why others here are suggesting the use of sudo. If you can tell us more about what exactly you need this user to do, we may be able to figure out something even better for your situation.
  • clerksx
    clerksx over 10 years
    As far as I can tell, the question isn't about adding the new user, but about giving them access to the superuser account.
  • PMint
    PMint over 10 years
    "You don't want to do that.", looks like he actually wanted it.
  • Admin
    Admin almost 9 years
    usermod: group 'sudo' does not exist
  • Peter - Reinstate Monica
    Peter - Reinstate Monica over 7 years
    Interesting -- when I did that once, I could not login as the original root any longer, apparently because early on in the login process only user IDs (which are both 0) are used to look up information, and the new user was found first.
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' over 6 years
    @PeterA.Schneider Not just early on in the login process. User IDs define an account. If there are two entries with the same user ID but different user names, they're the same account, with two sets of credentials.