需求:手动添加用户hive,基本组为hive ,id为5000,

vi /etc/group: 

hive:x:5000:


vi /etc/passwd:

hive:x:5000:5000:Hive:/home/hive:/bin/bash


vi /etc/shadow

hive:!!:(date +%s)/86400:0:99999:7:::


cp -r /etc/skel //home/hive

chown -R hive.hive /home/hive

chmod -R go=  /home/hive


生成密码:

openssl passwd -1 -salt '12345678'

输入密码:

生成密码

复制密码到vi /etc/shadow

hive:粘贴的加密密码:(date +%s)/86400:0:99999:7:::