Ubuntu add users and give sudo permission

Source: Internet
Author: User
Create a User

To create a user in Ubuntu, open Terminal (ctrl+alt+t) and execute the command (replace user_name with the username of R Choice etc Coolgeek).

sudo adduser user_name

(then you'll be prompted-Enter the details for the new user such as password, Name, number, Phone number etc, Ju St Enter the details correctly and hit ' Y ') granting sudo power to the User

Now, you've created the user, you can add the user to sudo group (which are created by default in Ubuntu, you could also us E Admin group) using the following command-

sudo adduser user_name sudo

OR

sudo adduser user_name admin

In the If sudo group doesn ' t exist or do want to create your own group then use the following commands- Creati ng a group (User group)

First create a group using the command (Replace group_name with the group want to create e.g geeky)-

sudo addgroup group_name

Then add this group to sudoers file, and to does that first open the file using the command-

sudo visudo

and add the following line to the bottom of the file (then save the file and exit).

%group_name all= (All:all) all

Although creating groups isn ' t necessary but it makes user management (with different privileges) much easier. Anyway, if you just want to grant root permission to all user then add this line to the sudoers file-

User_name All= (All:all) all

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.