![]() |
![]() |
![]() |
![]() |
![]() |
此為帳號相關的指令,一般使用者用 passwd 只能改自己密碼,如要改別人的密碼,鎖住帳號,設密碼的有效天數等進階管理只有 Superuser 才行 。
passwd 命令的基本語法為 passwd [OPTIONS] [USERNAME] 。
passwd 命令常用選項如下:
# passwd patrick -d ←刪除密碼(以後此帳號登入不用密碼) Removing password for user patrick. passwd: Success # passwd -l andy ←鎖住〝andy〞帳號(以後此帳號登入不能登入) Locking password for user andy. passwd: Success # passwd frank ←更改〝andy〞的密碼 Changing password for user frank. New password:←要求輸入新的密碼 |