#include <krb5.h> void qkrb_remove_kt_entry(char * keytab, char * principal, krb5_kvno version);Service Program Name: QSYS/QKRBGSS;
The qkrb_remove_kt_entry() function allows you to remove keytab entries from a keytab file for a specified principal.
Object | Authority Required |
---|---|
All directories in the path to the keytab file | *X |
Keytab file | *RW |
NULL | The keytab entries will be removed from the default keytab file. |
0 | Remove all versions of keytab entries from the keytab file. |
Message ID | Error Message Text |
---|---|
CPE4ABB E | Network Authentication Service failed with return code &1. |
The following example will remove a keytab entry from the default keytab file.
Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.
#include <krb5.h> #include <string.h.h> int main(int argc, char *argv[]) { /* Remove all the keytab entries from the default keytab file */ /* for the specified principal. */ /* This program accepts 1 parameter: */ /* 1: Pointer to the principal name of the entry being removed. */ char *principal; /* Copy the address of the principal to a local variable. */ principal = argv[1]; /* Remove all versions of the principal's keytab entries from the */ /* default keytab file. */ /* NOTES: When the first parameter, keytab, is set to NULL the */ /* default keytab file is used. The default file is */ /* commonly: */ /* /QIBM/UserData/OS400/NetworkAuthentication/keytab/krb5.keytab */ /* */ /* When the third parameter, version, is set to 0 all */ /* versions of the keytab entries will be removed. */ qkrb_remove_kt_entry(NULL, principal, 0); return; }
[ Back to top | Security APIs | UNIX-Type APIs | APIs by category ]