下列範例說明 david 以 passwd 指令來更換他的 UNIX 及 Kerberos 密碼。
% passwd passwd: Changing password for david Enter login (NIS+) password: <輸入目前的 UNIX 密碼> New password: < 輸入新的 UNIX 密碼> Re-enter password: <確認新的 UNIX 密碼> Old KRB5 password: < 輸入目前的 Kerberos 密碼> New KRB5 password: <e輸入新的 Kerberos 密碼 Re-enter new KRB5 password: <確認新的 Kerberos 密碼> |
在上面的範例中,passwd 會要求 UNIX 及 Kerberos 兩個密碼,不過如果 PAM 模組中設定了 try_first_pass 的話,Kerberos 密碼就會自動被設定為和 UNIX 密碼相同。(即為預設的設置)。這時,david 必須使用 kpasswd 來將他的 Kerberos 密碼設定為其他的密碼,如下所示。
此範例說明他只以 kpasswd 來變更他的 Kerberos 密碼﹕
% kpasswd kpasswd: Changing password for david@ENG.ACME.COM. Old password:<輸入目前的 Kerberos 密碼> New password: < 輸入新的 Kerberos 密碼> New password (again): <確認新的 Kerberos 密碼> Kerberos password changed. |
在此範例中,david 要更換 Kerberos 主管 david/admin(並非有效的 UNIX 使用者)的密碼。他必須使用 kpasswd 來更換密碼。
% kpasswd david/admin kpasswd: Changing password for david/admin. Old password: <輸入目前的 Kerberos 密碼> New password: <輸入新的 Kerberos 密碼> New password (again): <確認新的 Kerberos 密碼> Kerberos password changed. |