Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

userdb_read(3) [hpux man page]

userdb_read(3)						     Library Functions Manual						    userdb_read(3)

NAME
userdb_read(), userdb_write(), userdb_delete() - read, write or delete information in the user database, /var/adm/userdb SYNOPSIS
DESCRIPTION
These functions read, write, or delete information in the user database, which is described in userdb(4). The argument indicates a specific user entry in the user database. Attributes are accessed or modified only in this entry. For element i of the two arrays, is a pointer to the name of an attribute, and is a pointer to its value represented as text. The arrays and are terminated by a null character. reads the values of the attributes specified in the array from the user database into the corresponding array. If an attribute is not present, a null string is copied into the array. Each element (except for the terminating null) of the array is a pointer to a buffer. The size of each buffer is assumed to be at least bytes, which is defined in writes the values of the attributes specified in the array from the corresponding array into the database. For each null string in the array, the corresponding attribute is deleted; the system-wide default described in will then apply; see security(4). Attribute values are allowed to contain only printable ASCII characters (hex 20-7e). The tab character (hex 09) may also be used for the following special cases for Add or subtract num to or from the current attribute value. Both num and the current value are assumed to be a string of at most nine ASCII decimal digits. The current value may also have an optional sign, and is assumed to have a value of 0 if the attribute is not defined. No operation (do not modify the attribute). deletes a user entry from the database. The user entry contains all of the configurable and internal attributes for a user. RETURN VALUE
Upon successful completion, 0 is returned. ERRORS
If an error occurs, one of the following values is returned. could not find a database entry for the user specified in the argument invalid argument insufficient permission to access the user database a file system error occurred the value of one of the arguments is invalid the value of one of the arguments is invalid overflowed a database block overflowed the user entry database lock failure the database is disabled; see userdb(4) the argument is not a valid username the username specified by the argument is not a local user in EXAMPLES
The following program segment writes values for two attributes into the user database for user and then deletes a third attribute. It then reads and prints two attributes plus the attribute which it removed. Finally, it removes all of the attributes for user After successful execution, the output is: FILES
user database security defaults configuration file security attributes description file SEE ALSO
userdbget(1M), userdbset(1M), secdef(3), security(4), userdb(4). userdb_read(3)

Check Out this Related Man Page

userstat(1M)															      userstat(1M)

NAME
userstat - check status of local user accounts SYNOPSIS
[parm]... [parm]... DESCRIPTION
checks the status of local user accounts and reports abnormal conditions, such as account locks. If any parm arguments are specified, abnormal status is displayed only for those parameters, otherwise abnormal status is displayed for all parameters. The section describes the various parameter values that can be used for parm. Each account with an abnormal status is displayed on a single line. Each line contains the username followed by one or more parameters, indicating what abnormal conditions exist for the account. The section describes the various parameters that can be displayed. Options The following options are recognized: Display the status of all users listed in (Quiet) Do not print anything to standard output. This can be used when interested only in the return value. Check the status of only the specified user name. The user must be a local user listed in Parameters The parameters that could be displayed to indicate abnormal account status, or that could be used with the option, include the following: is displayed if an administrator lock is present on the account. This lock indicates that the encrypted password in or begins with An administrator lock can be set, for example, with is displayed if the account is locked because the account expiration date has been reached. days is the number of days that the account has been expired. See the description of the expiration field in shadow(4). is displayed if the account's password has expired. days is the number of days that the password has been expired. days is displayed only if its value can be determined. is displayed if the account is locked because there have been no logins to the account for a time interval that exceeds the maximum allowed. days is the number of days that the account has been inactive. See the description of the attribute in security(4). is displayed if the account is locked because the number of consecutive authentication failures exceeded the maximum allowed. num is the number of consecutive authentication failures. See the description of the attribute in security(4). is displayed if the account is locked because the account has a null password and is not allowed to have a null password. See the description of the attribute in security(4). is displayed if the account has a time-of-day login restriction. times defines the time periods that the user may login. See the description of the attribute in security(4). Security Restrictions Users invoking this command must have the authorization. See authadm(1M). is not supported for trusted systems. RETURN VALUE
exits with one of the following values: did not find abnormal status found abnormal status invalid usage or user not found EXAMPLES
The following example reports all abnormal status for all local accounts. The following example shows that the account for user is not locked due to too many consecutive authentication failures. FILES
standard password file shadow password file user database SEE ALSO
authadm(1M), passwd(4), security(4), shadow(4), userdb(4). userstat(1M)
Man Page