Linux基礎學習之用戶和組管理

一、用戶管理

1、添加用戶:useradd test1

  設置口令:passwd test1

2、刪除用戶:userdel test1

            userdel -r test1(連同用戶目錄一起刪除)

3、鎖定用戶:usermod -L test1

  解鎖用戶:usermod -U test1


二、組管理

1、添加組:groupadd gourp1

  刪除組:groupdel group1

2、添加用戶到組中:gpasswd -a test1 group1

  從組中刪除用戶:gpasswd -d test1 group1

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