手動添加用戶

需求:手動添加用戶hive,基本組爲hive ,id爲5000,
bash

vi /etc/group: ide

hive:x:5000:加密


vi /etc/passwd:
spa

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


vi /etc/shadowopenssl

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


cp -r /etc/skel //home/hiveclass

chown -R hive.hive /home/hivedate

chmod -R go=  /home/hive密碼


生成密碼:

openssl passwd -1 -salt '12345678'

輸入密碼:

生成密碼

複製密碼到vi /etc/shadow

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

相關文章
相關標籤/搜索