chcurrentuser

請使用 chcurrentuser 指令來變更現行使用者的屬性。

語法

讀取語法圖表略過語法圖表
>>-chcurrentuser -+--------------------------------------+------>
                  +- -password -+----------------------+-+   
                  |             '- cleartext_password -' |   
                  '- -nopassword ------------------------'   

>--+-----------------------------+-----------------------------><
   +- -keyfile - sshkey_filename-+   
   '- -nokey---------------------'   

參數

-password cleartext_password
(選用)指定要與現行使用者相關聯的新密碼。密碼開頭和結尾不能是空白。它必須由 6 - 64 個可列印的 ASCII 字元的字串組成。您可以選擇性地使用 password 參數來指定密碼。如果未指定密碼,在執行指令之前,系統會發出密碼提示,且不會顯示您輸入的密碼。您可以設定 password 參數或 nopassword 參數。
-nopassword
(選用)指定要刪除使用者的密碼。
-keyfile sshkey_filename
(選用)指定包含「安全 Shell (SSH)」公開金鑰的檔案名稱。您可以設定 keyfile 參數或 nokey 參數。
-nokey
(選用)指定要刪除使用者的 SSH 金鑰。

說明

請使用 chcurrent user 指令來修改現行使用者的屬性。

呼叫範例

chcurrentuser -password secret -nokey

結果輸出:

No feedback