Linux User and user group management

Source: Internet
Author: User

The user information created by/ETC/PASSWD will be displayed in this directory

1th paragraph: User name

2nd: Password, later placed in/etc/shadow

3rd paragraph: UID

4th paragraph: GID

5th paragraph: General user is generally empty, can write explain explanation

6th paragraph: Home directory

7th paragraph: Shell


/etc/shadow where the user's password exists

① User Name

② User Encrypted password

③ from January 1, 1970 to the last time the password was modified

④ password How many days to modify

⑤ How long will the password expire

⑥ How many days before the password expires alert

⑦ the number of days after the password expires lock account

⑧ Account life cycle

⑨ Reserved values


User Group Management

#groupadd GRP1 #增加一个grp1的用户组
#groupadd-G 1005 Grp2 #增加一个grp2用户组 and specifies a GID of 1005
#groupdel GRP1 #删除一个grp1用户组

Delete a group be sure that there are no group users in the group


User Management

#useradd User2 #增加一个user2的用户
#useradd-U 1004-g 1005 user3 #增加一个user3用户并指定uid为1004 GID is 1005
#useradd-u 1005-g 1005-d/home/zhdyaa-s/sbin/nologin user5 @ Adds a user5 with a custom UID of 1005 GID of 1005 (multiple users can join the same group), home directory /zhdyaa Parameters ~
#useradd-M User6 #增加一个user6 but do not create home directories
#userdel-R User5 #删除用户的同时, along with home directory also deleted!



This article is from the "Old seven Linux Operations Management" blog, please be sure to keep this source http://asd9577.blog.51cto.com/4291946/1934619

Linux User and user group 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.