SYNOPSIS
int MGOaddprincipal (Subscription *sub, int opt)
DESCRIPTION
The MGOaddprincipal() function adds a new uwnetid principal to Kerberos.
Information is passed through sub. The required and optional fields are:
- sub.uwnetid (r)
- sub.subscription_data (r)
- sub.attribute_data (o)
sub.uwnetid is the uwnetid name. sub.subscription_data is the
plaintext password. sub.attribute_data is the "gecos" data (for checking
password integrity). This could contains information which would be found in
the system password file's gecos field. opts can be one or more of:
- 0 - Default behavior
- 1 - Force completion (overrides MGO_E_IPW error)
RETURN VALUE
Returns 1 upon success or -1 if an error occurred (in which case
MGOerrno and MGOerrmsg are set appropriately).
ERRORS
- MGO_E_MAR - One or more of the required arguments were missing
- MGO_E_PMD - Permission denied. See access control
- MGO_E_KWI - A Kiwi error occurred. See MGOerrmsg for details
- MGO_E_ISC - Invalid subscription code (not a principal subscription)
- MGO_E_IPW - Invalid password. See MGOerrmsg for details
- MGO_E_SNP - Subscription is not permitted for uwnetid
- MGO_E_MAT - No match found (no such uwnetid)
- MGO_E_SQL - An SQL error occurred. See MGOerrmsg for details
AUTHENTICATION LEVEL
wmango
SEE ALSO
MGOchkprincipal(),
MGOsetpassword(),
MGOzero()