Index of Section 2 Manual Pages

Interix / SUAchpass.2Interix / SUA

chpass(2)                                                     chpass(2)

  chpass()

  NAME

    chpass() - change information in the user database

  SYNOPSIS

    #include 

    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)

  USAGE NOTES

    The chpass function is thread safe.

    The chpass function is not async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA