Create a user manually in linux. Step 1: Add a line of feng: x: 5000: Name: passwd to/etc/group: step 2: Add a line of feng: x: 5000: 5000: TestUser:/ho... create a user manually in linux, such as feng
Step 1:
Add a row to/etc/group
Feng: x: 5000:
Name: passwd location: GID: User list of the additional group
Step 2:
Add a row in/etc/passwd
Feng: x: 5000: 5000: Test User:/home/feng:/bin/bash
Name: Encrypted password: Time 1: Time 2: Time 3: Time 4: Time 5: Time 6: reserved segment
Encrypted password: separated by $. The first $ is followed by 1, indicating that the encryption algorithm is md5, the second $ is followed by the added sail, and the third $ is followed by the added password.
Time 1: Number of days from January 1, January 1, 1970 to the last modification
Time 2: minimum password validity period
Time 3: maximum password validity period
Time 4: How many days before the password expires
Time 5: Number of days after the password expires
Time 6: users have been disabled for a long time since January 1, January 1, 1970.
# Openssl passwd-1-salt 12345678 enter this command and enter the password as prompted to obtain the md5 value, that is, the content after the third $
Step 4: give the user skeleton
# Cp-r/etc/skel/home/feng
Copy the skeleton to the user
# Chown-R feng: feng/home/feng
Change the owner and Group of the skeleton to user
# Chmod-R go =/home/feng
Change the owner group of the skeleton and other user permissions to no permissions.
Then the feng user is created successfully.
This article is from "? I have been running ??? H "blog
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