How to Give Root Privileges to a User in Linux?
Contents

How do I add root privileges to a user in Linux?

Steps to Create a New Sudo User

  • Log in to your server as the root user. ssh [email protected]_ip_address.
  • Use the adduser command to add a new user to your system. Be sure to replace username with the user that you want to create.
  • Use the usermod command to add the user to the sudo group.
  • Test sudo access on new user account.

How do I give Sudo access to an existing user in Linux?

Steps to create a sudo user

  1. Log in to your server. Log in to your system as the root user: ssh [email protected]_ip_address.
  2. Create a new user account. Create a new user account using the adduser command.
  3. Add the new user to the sudo group. By default on Ubuntu systems, members of the group sudo are granted with sudo access.
Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest