Because of 8-bit wraparound, keytabs can contain entries with kvno 0. Because 0 is a distinguished kvno value for krb5_kt_get_entry(), kadmin's remove_principal() winds up substituting the specified kvno with the highest-numbered kvno of the specified principal in the keytab. Make sure not to perform this substitution when in specified-kvno mode. (This fix leaves behind a very minor bug where "ktrem principal 0" returns silently, instead of producing an error message like it normally would, if principal exists in the keytab but not at kvno 0.) https://github.com/krb5/krb5/commit/3bb5bee81fa978212fb7913e42409d0c5b668c85 Commit By: ghudson Revision: 24611 Changed Files: U trunk/src/kadmin/cli/keytab.c