unix設定或者改變使用者口令,可以直接鍵入passwd可修改自己的`口令,一般使用者只能修改自己的口令,而root使用者不僅可以修改自己的口令,還可以修改其他使用者的口令。
passwd username
比如,root使用者要修改apple使用者的口令,可執行:
passwd apple
Setting password for user:apple
last successful password change for apple:Tue Dec 30 08:34 2001
Choose passeord
You can choose whether you pick a password
or have the system create one for you.
a password
ounceable password will be generate for you
注:第一種方式是自己建立新口令,第二種方式是由系統為你建立一個可以發音的口令,我們一般選第一種方式。
Enter choose (default is 1):1
Please enter new password (at least 3 characters):
new password:
Re-enter password:
輸入口令時,螢幕上並不顯示。這是出於安全和保密的考慮。