e2k-kerberos

## e2k-kerberos e2k-kerberos — Kerberos utilities |

## Synopsis

    enum        E2kKerberosResult;
    E2kKerberosResult e2k_kerberos_change_password
                                                (const char *user,
                                                 const char *domain,
                                                 const char *old_password,
                                                 const char *new_password);
    E2kKerberosResult e2k_kerberos_check_password
                                                (const char *user,
                                                 const char *domain,
                                                 const char *password);

## Description

## Details

### enum E2kKerberosResult

    typedef enum {
    	E2K_KERBEROS_OK,
    	E2K_KERBEROS_USER_UNKNOWN,
    	E2K_KERBEROS_PASSWORD_INCORRECT,
    	E2K_KERBEROS_PASSWORD_EXPIRED,
    	E2K_KERBEROS_PASSWORD_TOO_WEAK,

    	E2K_KERBEROS_KDC_UNREACHABLE,
    	E2K_KERBEROS_TIME_SKEW,

    	E2K_KERBEROS_FAILED,
    } E2kKerberosResult;

The result from `e2k_kerberos_change_password()` or `e2k_kerberos_check_password()`.

`E2K_KERBEROS_OK` | Success
`E2K_KERBEROS_USER_UNKNOWN` | Unknown user
`E2K_KERBEROS_PASSWORD_INCORRECT` | Password incorrect
`E2K_KERBEROS_PASSWORD_EXPIRED` | Password has expired and must be changed
`E2K_KERBEROS_PASSWORD_TOO_WEAK` | Server rejected change_password request
`E2K_KERBEROS_KDC_UNREACHABLE` | DNS or network error while trying to reach Kerberos server
`E2K_KERBEROS_TIME_SKEW` | Could not communicate with Kerberos server due to client/server clock skew
`E2K_KERBEROS_FAILED` | Other error

### e2k_kerberos_change_password ()

    E2kKerberosResult e2k_kerberos_change_password
                                                (const char *user,
                                                 const char *domain,
                                                 const char *old_password,
                                                 const char *new_password);

Changes the password for the given user

`user` : | username
`domain` : | Windows (2000) domain name
`old_password` : | currrent password
`new_password` : | password to be changed to
Returns : | an E2kKerberosResult

### e2k_kerberos_check_password ()

    E2kKerberosResult e2k_kerberos_check_password
                                                (const char *user,
                                                 const char *domain,
                                                 const char *password);

Checks if the password is valid, invalid, or expired

`user` : | username
`domain` : | Windows (2000) domain name
`password` : | current password
Returns : | `E2K_KERBEROS_OK`, `E2K_KERBEROS_USER_UNKNOWN`, `E2K_KERBEROS_PASSWORD_INCORRECT`, `E2K_KERBEROS_PASSWORD_EXPIRED`, or `E2K_KERBEROS_FAILED` (for unknown errors)