COHERENT manpages

This page displays the COHERENT manpage for getspnam() [Get a shadow-password record, by user name].

List of available manpages
Index


getspnam() -- General Function (libc)

Get a shadow-password record, by user name
#include <shadow.h>
struct spwd *getspnam(uname)
char *uname;

The COHERENT system has  four routines that search the shadow-password file
/etc/shadow,  which contains  the password  of every  user of  your system.
getspnam()  returns  the  first entry  for  the  user  with  a given  login
identifier.   uname  points  to the  login  identifier  of  the user  whose
password you wish to retrieve.

If an  error occurs,  getspnam() returns  NULL.  Otherwise, it  returns the
address  of an  object with  the structure  spwd, which  is defined  in the
header file <shadow.h>. For  a description of this structure, see the
Lexicon entry for shadow.h.

Files

/etc/shadow
shadow.h

See Also

getspent(),
libc,
shadow,
shadow.h
POSIX Standard, §9.2.2

Notes

All structures  and information  returned are  in static areas  internal to
getspnam(). Therefore,  information from a previous  call is overwritten by
each subsequent call.