Linux-User Profiles

Source: Internet
Author: User

User provisioning Files: 1 User information file/etc/passwd 2 Shadow file/etc/shadow 3 Group information file/etc/group

4 set of password files/etc/gshadow

1 User Information file/etc/passwd

    1. User name
    2. Password flag (x means the user has a password, the password is mapped to the/etc/shadow file,)
    3. UID (User ID) (0: Super User 1-499: System User (System user also called pseudo user, used to start command, cannot log on and delete) 500-65535: normal user)
    4. GID (user initial group ID)
    5. User Description
    6. Home directory (normal User:/home/user name Super User:/root)
    7. The shell after login

Initial group: Refers to a group that a user has built on. Each user has only one initial group

[[email protected] ~]# cat/etc/passwd  root:x:0:0:root:/root:/bin/bash   Super User, with password, uid 0,gid for 0   Bin:x:1: 1:bin:/bin:/sbin/nologin   daemon:x:2:2:daemon:/sbin:/sbin/nologin  pseudo-user sbin:/ SBIN/SHUTDOWNSTACK:/VAR/RUN/AVAHI-DAEMON:/SBIN/NOLOGINTCPDUMP:X:72:72::/:/SBIN/NOLOGINSSHD:X:74:74: privilege-separated ssh:/var/empty/sshd:/sbin/nologinoprofile:x:16:16:special user account to being used by OProfile:/ Home/oprofile:/sbin/nologinChenna:x:500:500::/home/chenna:/bin/bash  General user chenkai:x:501:502::/home/ Chenkai:/bin/bash

You can change the UID of the configuration file to 0 instead of the normal user becomes superuser.

2 Shadow File/etc/shadow

    1. User name
    2. encryption password       (!! or * means no password, no login   For example, the pseudo-user is * or!!  )
    3. Password Last modified      
    4. Two-time password modification interval
    5. password validity period       (changed to n days, is to force the user to change the password every n days)
    6. The number of days before password modification expires
    7. Grace days after password expires (0: Expires immediately after password expiration       -1: Indicates that the password will not expire permanently )
    8. account Expiration Time   
    9. reserved
[Email protected] ~]# Cat/etc/shadowroot:$$9psq/qiicntcgyce$9wag77jc2ljk1pgpddi1lsxjlyuyoggzyaind8z4ewcp/ MLHVW
/ur/n8d7if1uvvkiwshwfr3ijuqepigajv2/:17357:0:90:7:5::
Super User
Bin:*:15513:0:99999:7:::sshd:!! : 17357: .:::: oprofile:!! : 17357::::::
Pseudo user
Chenna:$6$ijk6ovcc$itrmzztt.nek5ahhffszyighdfoqblls2pacmbxjvzcwce.dak3osfadf8
G7dke0azz9xo5ihaql2vszrnplg/:17357:0:99999:7:::
Normal User


You can modify this profile by adding the password before encrypting it! Disable the password, you can lock the user

3 Set of information files/etc/group

    1. Group name
    2. Group password flag (→/etc/gshadow)
    3. Gid
    4. Additional users in the group
sshd:x:74:oprofile:x:16:slocate:x:21:chenna:x:500:brother:x:501:chenkai:x:502:

3 Set of password files/etc/gshadow

    1. Group name
    2. Group password
    3. Group Administrator user Name
    4. Group Attach User
sshd:!::oprofile:!::slocate:!::chenna:!::brother:!::chenkai:!::

Linux-User Profiles

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.