linux--User and user group permissions

Source: Internet
Author: User

One, CentOS user rights related files
1./etc/passwd    (User rights information file)

[User name]:[password placeholder]:[user id]:[Group id]:[user description Information]:[user home directory]:[executable]

Users with "Bin/bash" in the [executable] section can log on normally, and users who are "Sbin/nologin" cannot log on.

2./etc/shadow   (user password file)

3./etc/group   (group file)

[Group name]:[Group Password placeholder]:[Group ID]

4./etc/gshadow   (group password file)

5./home/lihanx     (user home directory)

6./var/spool/mail/lihanx    (user mailbox file)

Second, user management related commands
ID lihanx     (view user lihanx information)

 Tom   (add new user Tom and specify uid=1000)
-G
-D (Specify home directory)
-S (Specify user shell)
-C (Specify user description information)

[[email protected] ~]# userdel-r Tom      (delete tom User and related information)

[Email protected] ~]# Usermod-D       (                            )-G                            -ug

linux--User and user group permissions

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.