[root@Linux one]# passwd user1 Changing password for user user1. New UNIX password: <--這裡輸入用戶的密碼 BAD PASSWORD: it is too simplistic/systematic Retype new UNIX password: <--再次輸入上面的密碼 passwd: all authentication tokens updated successfully. <--提示用戶設置密碼成功
[user1@Linux ~]$ passwd root passwd: Only root can specify a user name.
提示只有root用戶才能更改自己的密碼。我們在來看看用戶更改自己的密碼:
[user1@Linux ~]$ passwd Changing password for user user1. Changing password for user1 (current) UNIX password: <--輸入當前的密碼 New UNIX password: <--輸入新密碼 BAD PASSWORD: is too simple <--提示密碼太簡單 New UNIX password: <--輸入複雜的新密碼 Retype new UNIX password: <--再次輸入上面輸入的密碼 passwd: all authentication tokens updated successfully. <--提示密碼更改成功