Linux--Create a new user manually

Source: Internet
Author: User

First, the new user/etc/passwd/etc/shadow Pwconv

1. Open/etc/passwd File

Copy line 40th and paste to line 41st

2. Using Command Pwconv

The Pwconv command uses passwd and an optional and existing shadow to create the shadow.
3. Open/etc/shadow

1  temp6:!:16313:::::

User Creation Success

Of course, there's no password added.

Second, the new user group

1. Open/ect/group

Copy line 70th and change the name to TEMP6

2. Using Command Grpconv

Grpconv creates Gshadow from group and possibly existing Gshadow.
3. Open/etc/gshadow

User group Creation succeeded

And of course, no more passwords.

Third, create the user directory

1 #cp   -a/etc/skel/home/temp62 Create a user's home directory 34 #chown-R  TEMP6:TMP6  /home/temp65 Modifying the owner and user group of the directory 67 home/temp68 Modifying permissions for a directory

Iv. Adding a password

1 #passwd temp6 2 Create a user password 3 4 #gpasswd temp6 5 Create user group password 6 7 Specific commands use reference man manual

Linux--Create a new user manually

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.