Linux Add Super Admin user, modify, delete user

Source: Internet
Author: User

Useradd a user, to modify the/etc/passwd file in this line of users, to change the UID to 0,gid to 0 (where * * * represents a user name) this * * * *It has root privileges such as: root2:x:0:0::/home/root2:/bin/bash[user name]:[password]:[uid]:[gid]:[identity description]:[home directory]:[login Shell] Where: ⒈[user name] is the only record line in the passwd file"Uniqueness"the required domain. This means that the contents of the first area of each row cannot be the same, and other areas do not matter. ⒉[Password] Region previously, a 13-bit character that was encrypted with des by an irreversible hashing algorithm, but not single quotes and colons, was preserved. Of these 13-bit characters, the first two bits are the keys, which are randomly generated at the time of encryption. Since this string does not include single quotes, there was a previous way of not changing the password and preventing the user from logging in by adding a single quotation mark in front of the password. It is important to note that there is only one X character in the password area due to the use of the shadow password. ⒊[UID] Although the system is used to flag file attribution, to determine the various permissions of the flag, but the content of this area is not required to be unique. One example that is more common and relevant to security concerns is a user account with multiple UID and GID 0. Note that the last line of the file also has a UID and GID 0 user imnotroot, although it claims that it is not root, but it has the same permissions as root, because the system is not based on the [user name], but based on the UID and GID to divide the user's power. So, this situation undoubtedly buried a safe bomb for the system. However, when the Imnorroot does the lock screen and so on, if its password and root are different, it will not be unlocked, because the system only to find the first user uid 0 (natural root), it is not looking down-it is the UID is unique. ⒋[gid] User default group ID, this ID can be in the file/etc/group names are found in the groups. ⒌[Identity Description]: is the user's identity description, the default is no description, can be manually added. ⒍[Home Directory]: The user's home directory can be modified using the commands described earlier. ⒎[Login Shell]: The system-provided shell when the user logs in, please refer to the previous content. < Note >: [UID] and [GID] less than 500 are generally reserved by the system itself, not the identity of ordinary users and groups, so the newly added users and groups are generally UID and GID greater than 500--------------------------------------------------------------------------------------------------------------- ------------passwd root (change root user password)--------------------------------------------------------------------------------------------------------------- ------------Userdel-R Root2 (the common option is-r, which is to delete the user's home directory.) )

Linux Add Super Admin user, modify, delete user

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.