Create an account in Linux

Source: Internet
Author: User

First, log on to the root account,

1. Run useradd to create an account name.

2. Run passwd to add a password.

Passwd account can also change the password of this account

Add a record to the three files/etc/passwd,/etc/shadow,/etc/group.

/Etc/passwd: CAT/etc/passwd

X indicates that the account password has been moved to the/etc/shadow encrypted file, and/etc/passwd is accessible by all programs.

UID: 0 indicates that this account is a System Administrator, 1 ~ 499 retain systems for use, 500 ~ 65535 for general users

GID: corresponding to/etc/group

Home Directory: Enter the directory after login

/Bin/Bash: Set the shell to bash.

/Etc/shadow: CAT/etc/shadow




When a user logs on, the system reads the three files.

Of course, you can also delete the account, userdel command.

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: 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.