Add USER command

Source: Internet
Author: User
Add the USER command-general Linux technology-Linux technology and application information. The following is a detailed description. Note: I am talking about using commands to add users to the linux System in text mode of the linux system. You can also add users in shell mode.

We need to add users to the linux system. First, we need to confirm whether we have the permissions. This is the same as that in the windows operating system. In linux, only the system administrator has the permission to manage users. Therefore, you must first log on to the system using the system administrator account. In linux, we can use the useradd command to add users to the system. The specific format is useradd test. If you want to add a password for the user, you can enter passwd test, and then you can set the password for the test user we just added.

Add a user using the useradd command

Syntax: useradd-g is added to the user Idea Group-G is added to the additional group-d/home/abc-m abc (user name)

Note: Here-d is used to specify the user's main directory.

-M: If the user's home directory created by the-d option does not exist, create it. -M automatically copies the files in the/etc/skel directory to the user's home directory when creating a user. Therefore, you can put your initial user files in the/etc/skel folder.
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.