Home > Post > How-to: Create Sudoer user

How-to: Create Sudoer user

Giữ lại chút đề phòng có ngày dùng lại:
This is the method to create a user with sudo access:
First, we need to create a new user

sudo adduser user_name

Input your password 2 times, When prompted for Room number, phone number, etc.., just leave it as default value.

If you are on a Ubuntu server, just add the new user to admin group

sudo adduser user_name admin

Otherwise, you'll have to edit sudoer file.

sudo visudo

And then add your user to the last line ( I'm not going to teach you how to use Vim )

user_name ALL=(ALL)ALL

Save and then exit, login to your new user and test sudo access

Categories: Post Tags: , ,
  1. April 4th, 2009 at 09:17 | #1

    The user user_name will be able to use sudo command without password prompt ^^.

  2. April 4th, 2009 at 10:03 | #2

    Nope, the user can only use sudo command without password if we add "NOPASSWORD:ALL" in sudoer file

  3. April 4th, 2009 at 11:51 | #3

    Okay ^^.

  1. No trackbacks yet.