Create an account with root permissions in linux

Source: Internet
Author: User
Create an account with root privileges under linux useradd-u0-o-groot-Groot-d/home/user1user1usermod-u0-o-groot-Grootuser1 description:-u0: indicates that the uid is specified as 0 (0) the same as the root, after the login prompt is #... create an account named useradd-u 0-o-g root-G root-d/home/user1 user1usermod-u 0-o-g root-G root-g root user1 in linux: -u 0: indicates that the uid is specified as 0 (0), which is the same as the root user. the prompt after logon is # rather than $. -O: this parameter must be specified because the uid already exists (it is the same as the uid of the root account. -G root: the group name of the initialization group. when a user belongs to multiple groups (specified in the-G parameter), the group in which the user logs on. By default, the system creates a new group with the same name as the user name and sets it as the group name during initialization. Regardless of the group specified by-G. -G root: list of groups to which the user name belongs. a user can belong to multiple groups. group names are separated by commas (,). The group names must already exist. -D/home/user1: specify the user's home directory user1 to create user1 test: you can use the id user1 command to test the attributes of user1: uid = 0 (root), gid = 0 (root), group = 0 (root) description: gid indicates the initial GID.
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.