Linux account Management (ii)

Source: Internet
Author: User

again, the main purpose of this series of Linux blogs is not to introduce various commands, but to explore the theory behind the commands.

This article mainly introduces the user's creation and deletion.

Creating a user primarily uses the Useradd command, which allows you to specify various parameters when using this command. The general default is to: Useradd username. When we use the default values, they will help us with the project:

    • Create a line of account-related data in/etc/passwd, including creating Uid/gid/master files, etc.;
    • In/etc/shadow, the password related parameters of this account are filled in, but there is no password;
    • Add a group name that is the same as the account name in/etc/group;
    • Under/home, create a directory with the same name as the user's main folder, with permissions of 700.

In short, when using Useradd to create user accounts, the system will at least do the following for us:

    • Files for user account and password parameters:/etc/passwd,/etc/shadow
    • Files related to user groups:/etc/group,/etc/gshodow
    • User's home folder:/home/account name

When creating a user, with many defaults, these values come from the Useradd reference file, which can be called using the following method:

The contents of the/etc/default/useradd file are displayed. The contents of the document are briefly described below:

    • GROUP=100: The initial user group of the new account uses GID 100; in the system

Linux account Management (ii)

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.