shadow-utils 4.8.1
24.03.2020
Aliases: getspnam(3), getspnam(3), getspnam(3)
shadow-utils
Utilities for managing accounts and shadow password files
shadow
Password and account management tool suite with support for shadow files and PAM
libvolpack1-dev
fast volume rendering library (development package)
NAME
shadow, getspnam - Routinen f\(:ur die Datei, die die verschl\(:usselten Passw\(:orter enth\(:alt
SYNTAX
#include <shadow.h>
struct spwd *getspent();
truct spwd *getspnam(char *name);
void setspent();
void endspent();
struct spwd *fgetspent(FILE *fp);
struct spwd *sgetspent(char *cp);
int putspent(struct spwd *p, DATEIEN *fp);
int lckpwdf();
int ulckpwdf();
BESCHREIBUNG
getspent, getspname, fgetspent, and sgetspent each return a pointer to a struct spwd. getspent returns the next entry from the file, and fgetspent returns the next entry from the given stream, which is assumed to be a file of the proper format. sgetspent returns a pointer to a struct spwd using the provided string as input. getspnam searches from the current position in the file for an entry matching name.
setspent and endspent may be used to begin and end, respectively, access to the shadow password file.
The lckpwdf and ulckpwdf routines should be used to insure exclusive access to the /etc/shadow file. lckpwdf attempts to acquire a lock using pw_lock for up to 15 seconds. It continues by attempting to acquire a second lock using spw_lock for the remainder of the initial 15 seconds. Should either attempt fail after a total of 15 seconds, lckpwdf returns -1. When both locks are acquired 0 is returned.
DIAGNOSE
Routines return NULL if no more entries are available or if an error occurs during processing. Routines which have int as the return value return 0 for success and -1 for failure.
WARNUNGEN
Diese Routinen k\(:onnen nur von Root verwendet werden, da der Zugriff auf die Shadow-Passwort-Datei beschr\(:ankt ist.
DATEIEN
/etc/shadow
verschl\(:usselte Informationen zu den Benutzerkonten