練功房推薦書單

  • 猛虎出柙雙劍合璧版--最新 OCA / OCP Java SE 7 Programmer 專業認證 (電子書)
  • 流浪教師存零股存到3000萬(全新增修版)(書+DVD)
  • 開始在關西自助旅行(京都‧大阪‧神戶‧奈良)(全新增訂版)
  • 不敗教主的300張股票存股術

[Linux]停用帳號 RSS feed
討論區首頁 » Linux/Unix
發表人 內容
andowson

七段學員
[Avatar]

註冊時間: 2007/1/2
文章: 718
來自: 台北
離線
如果不想刪除帳號,暫時性不讓某個使用者使用系統,可將該帳號鎖定,指令如下:
passwd -l username
參數說明如下:
-l     This  option  is  used  to  lock the specified account and it is

available to root only. The locking is performed by rendering
the encrypted password into an invalid string (by prefixing the
encrypted string with an !).


要恢復(解除鎖定)則用:
passwd -u username
參數說明如下:
-u     This  is  the  reverse  of  the  -l  option - it will unlock the

account password by removing the ! prefix. This option is avail-
able to root only. By default passwd will refuse to create a
passwordless account (it will not unlock an account that has
only "!" as a password). The force option -f will override this
protection.

參考資料:
http://nmc.nchu.edu.tw/linux/User_mng.htm

分享經驗 累積智慧
[WWW]
 
討論區首頁 » Linux/Unix
前往:   
行動版