Ubuntu create new users and increase administrator privileges

Source: Internet
Author: User

Turn from: Ubuntu Create new users and increase administrator privileges

$ is an ordinary administrator, #是系统管理员, under Ubuntu, the root user does not have a password by default and therefore cannot be used (supposedly for security). If you want to use root, you have to set a password for the root user:
sudo passwd root
Then login to enter the user name root, and then enter the password on the line.
Ubuntu build users best with AddUser, although AddUser and Useradd are the same in other Linux systems, but I use useradd under Ubuntu, and did not create the same name as the user home directory.
Example: AddUser user1
This will automatically create the user home directory and create a group with the same name as the user.
[Email protected]:~# sudo adduser linuxidc
[sudo] password for XX:
Enter the password of XX user, the following information appears
Adding user "LINUXIDC" ...
Adding new Group "LINUXIDC" (1006) ...
Adding new User "LINUXIDC" (1006) to group "LINUXIDC" ...
Create home directory "/HOME/LINUXIDC" ...
Copying files from "/etc/skel" ...
Enter a new UNIX password:
Re-enter the new UNIX password:
Two times enter the initial password of LINUXIDC, the following information appears
Passwd:password updated successfully
Changing the user information for LINUXIDC
Enter the new value, or press ENTER for the default
Full Name []:
Number []:
Work Phone []:
Home Phone []:
Other []:
Full Name []: Wait for information to return all the way
Is this information correct? [y/n] Y
To this, the user adds success. If you want this user to have root privileges, execute the command:
[Email protected]:~# sudo vim/etc/sudoers
Modify the file as follows:
# User Privilege Specification
Root all= (All) all
LINUXIDC all= (All) all
Save exit, LINUXIDC user has root privileges.

For more information about Ubuntu see the Ubuntu feature page http://www.linuxidc.com/topicnews.aspx?tid=2

Ubuntu create new users and increase 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.