Checks the user's password to determine if it has expired.
passwdexpired (UserName, Message) char *UserName; char **Message;
The passwdexpired subroutine checks a user's password to determine if it has expired. The subroutine checks the registry variable in the /etc/security/user file to ascertain where the user is administered. If the registry variable is not defined, the passwdexpired subroutine checks the local, NIS, and DCE databases for the user definition and expiration time.
The passwdexpired subroutine may pass back informational messages, such as how many days remain until password expiration.
|UserName||Specifies the user's name whose password is to be checked.|
|Message||Points to a pointer that the passwdexpired subroutine allocates memory for and fills in. This string is suitable for printing and issues messages, such as in how many days the password will expire.|
Upon successful completion, the passwdexpired subroutine returns a value of 0. If this subroutine fails, it returns one of the following values:
|1||Indicates that the password is expired, and the user must change it.|
|2||Indicates that the password is expired, and only a system administrator may change it.|
|-1||Indicates that an internal error has occurred, such as a memory allocation (malloc) failure or database corruption.|
The passwdexpired subroutine fails if one or more of the following values is true:
|ENOENT||Indicates that the user could not be found.|
|EPERM||Indicates that the user did not have permission to check password expiration.|
|ENOMEM||Indicates that memory allocation (malloc) failed.|
|EINVAL||Indicates that the parameters are not valid.|
This subroutine is part of Base Operating System (BOS) Runtime.
The authenticate subroutine.
The login command.