Ubuntu command line Add new user with Administrator privileges

Source: Internet
Author: User

Recently bought a server, only a root user, every day login is not convenient, so want to create new users, before the local is the interface session of the new user, this time to record the learning command line to create a new user process:

The first step:

# sudo adduser zhq This ZHQ is your own defined user name

The next class will appear a series of input information, as long as the UNIX password to enter the user's password in the line, and then confirm once;

The back is a return. Then the user is built.

But at this time the user is not sudo, that is, can not use administrator rights; take the second step.

Step Two:

# sudo vim/etc/sudoers

Modify the file section as follows:

# User Privilege Specification
Root all= (All:all) all
ZHQ all= (All:all) All (I've added myself to the root, where ZHQ is my username)

There are also some that write:

Root all= (All) all

Just follow the root and add the line.


Save exit, ZHQ user has root privileges. You can use sudo.

Ubuntu command line Add new user with Administrator privileges

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.