Account Management commands and files in Linux

Source: Internet
Author: User
& Nbsp; command: # useraddsunday -- & gt; add user useradd-u720-g100-M-s/bin/bashsunday-M don't create root directory-d specify root directory-s use shell # passwdsunday -- & gt; add a password for the user # usermod? Lsunday -- & gt; locked account  

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

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.