Summary of new users added in Linux

Source: Internet
Author: User
A summary of new users added under Linux-general Linux technology-Linux technology and application information. The following is a detailed description. Example 1: the requirement is to add a user feng in Linux to require that the main group of feng be root and also belongs to family, you must also specify the description of the user during the creation process (for example, the user name fengxzhz ).

Adduser-c "fengxzhz"-d/home/feng-g root-G family-m-s/bin/bash;

-C indicates that part-u directly gives a UID

-D direct his home directory to an existing Directory (the system will not create any more)

-G declares the main group

-G affiliated group-m creates a Home Directory

-S defines the shell it uses.

Example 2. modify an existing account. For example, set the expiration time of the created account feng to 2008.12.30.

Usermod-e 2008-12-30 feng;

Example 3: delete a user

Userdel feng;

In this process, changes to multiple archives are involved, including:

/Etc/passwd
/Etc/shadow
/Etc/group
/Etc/gshadow
/Etc/skel
/Etc/default/useradd
/Etc/login. defs

The red part is the main file!

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.