您可以有兩種更換您 Kerberos 密碼的方法﹕
以一般性的 UNIX passwd 指令來更換密碼。在安裝 SEAM 之後,Solaris 的passwd 指令也會自動提示您輸入一個新的 Kerberos 密碼。
使用 passwd 而非 kpasswd 的好處在於您可以同時設定這兩個密碼(UNIX 及 Kerberos)。不過一般而言,您並不需要以 passwd 來更換這兩個密碼;通常您只需要更換 UNIX 密碼而保留 Kerberos 密碼不變,或是反之亦然。
passwd 的行為要視 PAM 模組的設定方式而定。某些設置會要求您更換兩種密碼。某些網站會要您更換 UNIX 密碼,其他的則要求您更換 Kerberos 密碼。
以 kpasswd 指令來更換密碼。kpasswd 和 passwd 非常類似。其中的不同點在於 kpasswd 只會更換 Kerberos 密碼 - 如果您想要更換 UNIX 密碼的話,就必須使用 passwd
另一個不同之處是 kpasswd 可以更換並非有效 UNIX 使用者的一位 Kerberos 主管的密碼。例如﹕david/admin 是一位 Kerberos 主管,但又不是一位 UNIX 使用者,因此您就必須使用 kpasswd 而非 passwd。
在您更換您的密碼之後,變更要花一點時間才會傳播到整個系統(特別是在大型網路之上)。視您系統的設定而定,可能要花到幾分鐘到幾個小時或甚至更久。如果您必須在更換您的密碼之後馬上取得一張新的 Kerberos 許可證,請先試用您的新密碼。如果新密碼無效,再試著使用舊的密碼。
Kerberos V5 允許系統管理員指定可供每位使用者使用的密碼條件。此種條件是由為每位使用者所定的政策(或是一個預設的政策)來定義的 - 請參見 "管理政策" 中有關政策的詳細說明。例如,假設 jennifer 的政策(譬如說是 jenpol)規定密碼至少要有八個字母,還要包括至少兩種字元類型。那麼 kpasswd 就會拒絕接受 "sloth" 作為一個密碼﹕
%kpasswd kpasswd: Changing password for jennifer@ENG.ACME.COM. Old password:<jennifer 輸入她現存的密碼> kpasswd: jennifer@ENG.ACME.COM's password is controlled by the policy jenpol which requires a minimum of 8 characters from at least 2 classes (the five classes are lowercase, uppercase, numbers, punctuation, and all other characters). New password: <jennifer 輸入 'sloth'> New password (again): <jennifer 重新輸入 'sloth'> kpasswd: New password is too short. Please choose a password which is at least 4 characters long. |
jennifer 在這__使用 "slothrop49" 來作為密碼。'slothrop49' 符合條件,因為它的長度超過八個字母,而且包含兩種不同的字元(數字和小寫字母)﹕
% kpasswd kpasswd: Changing password for jennifer@ENG.ACME.COM. Old password:<jennifer 輸入她現存的密碼> kpasswd: jennifer@ENG.ACME.COM's password is controlled by the policy jenpol which requires a minimum of 8 characters from at least 2 classes (the five classes are lowercase, uppercase, numbers, punctuation, and all other characters). New password: <jennifer 輸入 'slothrop49'> New password (again): <jennifer 重新輸入 'slothrop49'>Kerberos password changed. |
下列範例說明 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. |