Article Title: account management commands and files in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Command:
# Useradd Sunday --> Add a user
Useradd-u 720-g 100-M-s/bin/bash Sunday
-M does not create a root directory.
-D: Specify the root directory.
-S shell
# Passwd Sunday --> Add a password for the user
# Usermod? L Sunday --> lock the account
# Usermod? U Sunday --> unlock an account
# Usermod? E 2008-08-08 Sunday --> set the Account expiration time
# Groupadd debian --> Add a group account
# Useradd? G debian Sunday --> specifies the group to which the user belongs
# Usermod? G debian Sunday --> modify the group to which the user belongs
# Groupdel debian --> delete a group
File:
/Etc/shadow
Username: encrypted password (if * indicates that the account cannot be logged in): Last modification time (days from January 1, January 1, 1970): minimum number of days for the password to be modified: number of days before password modification warning to users: Number of days after password termination when the account is disabled: Number of days since January 1, January 1, 1970: reserved domain
Drobbins: $1 $1234567890123456789012345678901: 11664: 0:-1:-1:-1:-1:0
/Etc/passwd
Username: password: User ID: Group ID: comment: home directory: shell
Command executed after the user logs on
/Etc/group
Groupname: x (indicates that the group lease password is in/etc/shadow): GID: usernames
Root: x: 0: root, Sunday, onlyisi