Linux Account and Identity management

Source: Internet
Author: User
Tags md5 encryption

▲ Identity Information Description

Root:x:0:0:root:/root:/bin/bash???????? Store in/etc/passwd

???? The first root???? User name

???? A second x???? Password (use MD5 encryption, total 34 bits, view in/etc/shadow, first three bits is $1$)

???? A third 0???? Uid

???? Fourth of 0???? GID (represents the root user's initialization user group, which is its effective user group)

???? Fifth root???? User Description

???? Sixth a/root???? User home Directory

???? Seventh a/bin/bash???? The shell used

?

When the UID is 0 o'clock, this account is the system administrator. 1~99 reserved to the System preset account, 100~499 is reserved for some services to use. 500~2^32-1 is used by the general user.

?

Use Uname–r to view the core of a Linux system

?

Use groups to view the user group to which root belongs, the first domain is a valid user group

?

Use NEWGRP to change the active user group of the currently logged on user

?

Use Exit to exit the current user group

?

▲ User additions and deletions

Useradd [-U UID] [-G initial_group] [-G other_group] [-mm] [-C description Bar] [-D home] [-s Shell] Username

???? Parameter-G???????? Groups that can be supported. This parameter will modify the relevant data in/etc/group and/etc/gshadow.

???? Parameter-M???? Force does not establish user home directory

???? Parameter-m???????? Force User Home Directory creation

???? Parameter-R???????? Establish a System account, the UID of this account will be limited (between 100~499)

?

Userdel [-RF] Username

???? Parameter-R???????? User's home directory is deleted together

???? Parameter-F???????? Even if the user logged in, also forced to delete, while home directory and mailbox, such as delete together

Secure method: First Find/-user username investigate the entire system belongs to the username file, and then Userdel delete

?

passwd [-LUNXWS] Username

???? Parameter-l???????? Lock the password of this account, modify the password bar in the/etc/passwd

???? Parameter-u???????? Unlock the Lock

???? Parameter-n???????? Number of days followed, indicating that no password changes are allowed within a few days

???? Parameter-x???????? Number of days after which the password needs to be re-modified

???? Parameter-W???????? The number of days to follow, indicating a few days in advance to remind users to change password

???? Parameter-s???????? Show information about the username

?

Usermod [-cdeqglsulu] Username

???? Parameter-u???????? followed by the UID number (/etc/passwd in the third column)

???? Parameter-G???????? Followed by group name (fourth column in/etc/passwd)

???? Parameter-G???????? Follow the group name (/etc/group) and modify the user-supported groups

???? Parameter-c???????? Access Account description (/etc/passwd fifth column)

???? Parameter-D???????? Access Account Home Directory (/etc/passwd sixth column)

???? Parameter-s???????? Access the Shell's actual file and modify the shell used by the user

???? Parameter-e???????? After date yyyy-mm-dd (/etc/shadow), account expiration date

???? Parameter-l???????? Receive account name (/etc/passwd first column)

???? Parameter-l???????? Temporarily freezes the user's password and cannot log in (/etc/shadow's password bar)

???? Parameter-u???????? /etc/shadow the password bar! Take it off, unlock it.

?

Linux Account and Identity management

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.