/** * Remove all the keys of the specified principal in the specified keytab * file. * * @param keytabFile The keytab file * @param principalName The principal name * @throws KrbException If there is a problem removing the keys of the specified principal */ public static void removeKeytabEntriesOf(File keytabFile, String principalName) throws KrbException { Keytab keytab = loadKeytab(keytabFile); keytab.removeKeytabEntries(new PrincipalName(principalName)); storeKeytab(keytab, keytabFile); }
/** * Remove all the keys of the specified principal in the specified keytab * file. * * @param keytabFile The keytab file * @param principalName The principal name * @throws KrbException If there is a problem removing the keys of the specified principal */ public static void removeKeytabEntriesOf(File keytabFile, String principalName) throws KrbException { Keytab keytab = loadKeytab(keytabFile); keytab.removeKeytabEntries(new PrincipalName(principalName)); storeKeytab(keytab, keytabFile); }
/** * Remove all the keys of the specified principal with specified kvno * in the specified keytab file. * * @param keytabFile The keytab file * @param principalName The principal name * @param kvno The kvno * @throws KrbException If there is a problem removing the keys of the specified principal */ static void removeKeytabEntriesOf(File keytabFile, String principalName, int kvno) throws KrbException { Keytab keytab = loadKeytab(keytabFile); keytab.removeKeytabEntries(new PrincipalName(principalName), kvno); storeKeytab(keytab, keytabFile); }
/** * Remove all the keys of the specified principal with specified kvno * in the specified keytab file. * * @param keytabFile The keytab file * @param principalName The principal name * @param kvno The kvno * @throws KrbException If there is a problem removing the keys of the specified principal */ static void removeKeytabEntriesOf(File keytabFile, String principalName, int kvno) throws KrbException { Keytab keytab = loadKeytab(keytabFile); keytab.removeKeytabEntries(new PrincipalName(principalName), kvno); storeKeytab(keytab, keytabFile); }