krb5_kuserok
- verifies if a principal can log in as a user
LIBRARY
Kerberos 5 Library (libkrb5, -lkrb5)
SYNOPSIS
#include <krb5.h> krb5_boolean
Fo krb5_kuserok
Fa krb5_context context
Fa krb5_principal principal
Fa const char *name
Fc
DESCRIPTION
This function takes a local user
Fa name
and verifies if
Fa principal
is allowed to log in as that user.
First
check if there is a local account name
Fa username.
If there isn't,
returns
FALSE
Then
checks if principal is the same as user@realm in any of the default
realms. If that is the case,
returns
TRUE
After that it reads the file
.k5login
(if it exists) in the users home directory and checks if
Fa principal
is in the file.
If it does exists,
TRUE
is returned.
If neither of the above turns out to be true,
is returned.
The
.k5login
should contain one principal per line.