Jump to content

Create a USER Account with ROOT Privileges


Recommended Posts

Use the following commands to create the new user dennis, grant him the same privileges as root and set him a password :

# useradd -ou 0 -g 0 dennis
# passwd dennis

Perhaps you already have some user dennis and you would like to give root permissions to a normal user.

# grep dennis /etc/passwd

Edit /etc/passwd file and grant root permissions to the user dennis by changing User and Group IDs to UID 0 and GID 0 :

# $ grep dennis /etc/passwd

You won't be able to delete second root user with another UID 0 using userdel command.

# userdel dennis
userdel: user dennis is currently used by process 1

To delete user dennis with UID 0, open /etc/passwd file and change dennis's UID.

For example, change the line :




Now, you'll be able to delete user dennis with userdel command (as shown above)


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...