Create an account with root privileges under Linux

Source: Internet
Author: User

Create an account with root privileges under Linux

Useradd-u 0-o-G root-g root-d/home/user1 user1

Usermod-u 0-o-G root-g Root user1

Description

-U 0: Specifies that the UID is specified as 0 (0) as root, and the prompt after login is # instead of $.

-O: This parameter must be specified because the UID is duplicated (repeat with the root account uid).

-G Root: The group name of the initialization group, when the user belongs to more than one group, (as specified in the-G parameter), the group in which the login is located. By default, the system creates a new group with the same name as the user name, and is set to the group name when it is initialized. Regardless of which group-G is specified.

-G root: Specifies the list of groups to which the user name belongs, a user can belong to more than one group, the group name is separated by commas, and the group name must already exist.

-d/home/user1: Specify the user's home directory

User1 new user name User1

Test: You can test the properties of user name User1 with the ID user1 command, shown as:

Uid=0 (Root), gid=0 (Root), group=0 (Root)

Description: GID indicates that the GID number is initialized.

  • This article is from: Linux Tutorial Network

Create an account with root privileges under Linux

Related Article

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.