pxfgetpwuid
- Date:
10-20-2011
NAME
PXFGETPWUID - Gets password information by using user ID
SYNOPSIS
INTEGER iuid, jpasswd, ierror
CALL PXFGETPWUID (name, iuid, jpasswd, ierror)
IMPLEMENTATION
Cray Linux Environment (CLE)
STANDARDS
IEEE Std 1003.9-1992 standard interface for FORTRAN 77
DESCRIPTION
PXFGETPWUID uses the getpwuid(3c) function to return password information about a user ID. It uses the following components of the passwd structure:
- pw_name
Login name
- pw_uid
User ID
- pw_gid
Group ID
- pw_dir
Default login directory
- pw_shell
Default login shell or program
The following components are supported but are not part of the POSIX 1003.9-1992 standard.
- pw_passwd
Encrypted password
- pw_age
Password age (character string)
- pw_comment
Comment
- pw_gecos
Comment
All arguments must be of default kind unless documented otherwise. Default kind is KIND=4 for integer, real, complex, and logical arguments.
The following is a list of valid arguments for this routine:
- name
An input character variable or array element containing the login name for which password information is requested.
- iuid
An input integer variable containing the user ID for which password information is requested.
- jpasswd
An output handle of type passwd created with PXFSTRUCTCREATE(3F).
- ierror
An output integer variable that contains zero if PXFGETPWUID was successful or nonzero if PXFGETPWUID was not successful.
The PXFGETPWUID routine may return the following errors:
- ENOENT
If an entry matching the user ID in iuid was not found.
- EBADHANDLE
If jpasswd is an invalid handle or has an incorrect handle type.
EXAMPLES
In this example, the password information will be acquired for the login name root.
program pxftest
integer iuid, ierror, value
integer*8 jpasswd
CALL PXFSTRUCTCREATE('passwd',jpasswd,ierror)
iuid=0
CALL PXFGETPWUID(iuid,jpasswd,ierror)
if (ierror .eq. 0) then
print *,'PASSED: pxfgetpwuid call'
else
print *,'FAILED: pxfgetpwuid call with error = ',ierror
endif
CALL PXFSTRUCTFREE(jpasswd,ierror)
end
SEE ALSO
getpwnam(3c), PXFSTRUCTCREATE(3F), PXFSTRUCTFREE(3F)