Checks the validity of a user account.
#include <login.h>
int ckuseracct ( Name, Mode, TTY)
char *Name;
int Mode;
char *TTY;
Note: This subroutine is obsolete and is provided only for backwards compatibility. Use the loginrestrictions subroutine, which performs a superset of the functions of the ckuseracct subroutine, instead.
The ckuseracct subroutine checks the validity of the user account specified by the Name parameter. The Mode parameter gives the mode of the account usage, and the TTY parameter defines the terminal being used for the access. The ckuseracct subroutine checks for the following conditions:
The Mode parameter specifies other mode-specific checks.
Files Accessed: |
Mode | File |
---|---|
r | /etc/passwd |
r | /etc/security/user |
If the account is valid for the specified usage, the ckuseracct subroutine returns a value of 0. Otherwise, a value of -1 is returned and the errno global variable is set to the appropriate error code.
The ckuseracct
subroutine fails if one or more of the following are true:
This subroutine is part of Base Operating System (BOS) Runtime.
The ckuserID (ckuserID Subroutine) subroutine, getpcred (getpcred Subroutine) subroutine, getpenv (getpenv Subroutine) subroutine, setpcred subroutine, setpenv subroutine.
The login command, rlogin command, su command, telnet command.
The cron daemon.
List of Security and Auditing Subroutines and Subroutines Overview in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.