getauthent(3x) [ultrix man page]
getauthuid(3x) getauthuid(3x) Name getauthuid, getauthent, storeauthent, setauthent, setauthfile, endauthent - get/set auth entry Syntax #include <sys/types.h> #include <auth.h> AUTHORIZATION *getauthuid(uid) uid_t uid; AUTHORIZATION *getauthent() int storeauthent(auth) AUTHORIZATION *auth; void setauthent() void setauthfile(pathname) char *pathname; int endauthent() Description The function looks up the auth entry for the specified user ID and returns a pointer to a static area containing it. The function retrieves the next sequential entry from the auth database and returns a pointer to a static area containing it. The function stores the specified auth entry into the local auth database, overwriting any existing entry with the same a_uid field. The function sets a pointer to the beginning of the auth database. This function is used with to make multiple passes through the auth database. The function sets the pathname of the file to be used for the local auth database in all subsequent operations. The function closes the auth database. Subsequent calls to getauthuid, getauthent, or storeauthent reopen it. The auth database can be distributed via the BIND/Hesiod naming service. Restrictions Only the superuser and members of the group authread may read information from the auth database. Only the superuser may modify the auth database. The auth database cannot be distributed via the Yellow Pages service. When the auth database is served by BIND/Hesiod, a program must perform its own Kerberos initialization prior to using any of these func- tions. The values returned by and point to a static area which is overwritten when subsequent calls are made. Return Values Functions which return a pointer value return the null pointer(0) on EOF or error. Other functions return zero(0) on success and a nega- tive value on failure. Files See Also getpwent(3), auth(5), edauth(8) Security Guide for Users Security Guide for Administrators Guide to the BIND/Hesiod Service getauthuid(3x)
Check Out this Related Man Page
getauth(8) System Manager's Manual getauth(8) Name getauth, setauth, rmauth - auth database maintenance Syntax getauth [username] setauth rmauth username Description The command takes as it's only argument a user name or UID. If a user name is supplied it is converted to a UID by searching through The UID is then used to look up the users entry in the database. If an entry is found it is converted to an ASCII string with a syntax resem- bling that of the passwd file and printed out as a single line. If no entry is found nothing is printed and an exit status of `1' is returned. # getauth username 1000:idvidfy8d:1920129:3600:2678400:0e:0:1000:0:00:00 The first field is the UID of the entry which is used as the key into the database. Then follows: the encrypted password, password modifi- cation time, minimum password lifetime, maximum password lifetime, account mask, login failure count, audit ID, audit control, audit mask, and a reserved field. If the optional username argument is not supplied to getauth it will produce an output line for every entry in the auth database. The command expects one or more lines from the standard input which must be of a form identical to that produced by the command. The com- mand converts and stores these lines into the database, one entry per line, replacing any entry already existing for the given UID. By piping the output of the command into the input of the command an expensive NOP can be produced: # /usr/etc/sec/getauth | /usr/etc/sec/setauth The command expects exactly one argument, the user name or UID of an auth entry to be deleted. If the entry is found it is erased and deleted. If it is not found no action is taken and an exit status of 1 is returned. Restrictions Only the superuser and members of the group may read information from the auth database. Only the superuser may modify the auth database. Diagnostics An exit value of 0 indicates a successful operation. An exit status of 1 indicates the entry was not found on a lookup or deletion opera- tion. Any other exit status indicates an error. Files See Also getauthuid(3), getpwent(3), auth(5), edauth(8) Security Guide for Administrators getauth(8)