手動添加新用戶hive ,基本組爲hive(5000).附加組mygroup


先添加一個組,nano /etc/group,切換最後一行,

添加hive:x:5000:                          mygroup後面用戶區加上hive

添加用戶 nano /etc/passwd     加上 hive:x:5000:5000:Hive:/home/hive:/bin/bash

nano /etc/shadow打開並添加一行  hive:!!:15765:0:99999:7:::

bc 計算器   q退出 scale=2保留兩位精度

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

chown -R hive:hive /home/hive/

chmod -R go= /home/hive/

su - hive 可以,但沒密碼,不能登錄

openssl passwd  -1 -salt '12354678' 輸入密碼 生成MD5碼 然後粘貼替換到 /etc/shadow 中的!!中

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章