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: passwd location: UID: GID: CECOS (Note): diecloud (Home Directory): shell
Step 3:
Add a row to/etc/shadow
Feng: $1 $12345678 $ 0ME5N6oDyoEAwUp7b5UDM/: 15355: 0: 99999: 7 :::
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 the blog titled "zookeeper ".