chpass()

NAME

chpass() - change information in the user database

SYNOPSIS

#include <interix/interix.h>

int chpass(char *fq_user, char *oldpw, char *newpw)

DESCRIPTION

This call, unique to INTERIX, changes a user's password in the user database. All three arguments are null-terminated strings. The fq_user argument is the name of the user whose password will be changed. It must be provided as a fully-qualified name (as in DOMAIN+fq_user).

RETURN VALUES

On success, the chpass(2) returns 0. On failure, it returns -1 and sets errno.

ERRORS

The chpass(2) call can fail for the following reasons.

[EINVAL]
Invalid (NULL) arguments passed to chpass(2).
[ENOMEM]
No memory could be allocated.
[EPERM]
The password is not allowed to be changed for this account, or oldpw is incorrect, or the newpw does not meet the local security restrictions.
[ESRCH]
No process could be found corresponding to that specified by the given process ID. One of the arguments was not provided.

SEE ALSO

passwd(1)