Home :: International :: Manuals :: Howto :: FAQ :: Man Pages :: Email Login

 
 

 

GETPWENT

Section: Bibliotheksfunktionen (3)
Updated: 27. Mai 1996
Index Return to Main Contents
 

BEZEICHNUNG

getpwent, setpwent, endpwent - arbeite mit Paßworteintrag  

ÜBERSICHT

#include <pwd.h>
#include <sys/types.h>

struct passwd *getpwent(void);

void setpwent(void);

void endpwent(void);
 

BESCHREIBUNG

Die Funktion getpwent() gibt einen Zeiger auf eine Struktur zurück, die den Inhalt einer Zeile von /etc/passwd repräsentiert. Beim ersten Aufruf wird der erste Eintrag zurückgegeben, bei weiteren die nachfolgenden.

Die Funktion setpwent() setzt den Dateizeiger auf den Anfang der Paßwortdatei /etc/passwd.

Die Funktion endpwent() schließt /etc/passwd.

Die Struktur passwd ist in <pwd.h> wie folgt definiert:


struct passwd {
        char    *pw_name;       /* Benutzername */
        char    *pw_passwd;     /* Paßwort */
        uid_t   pw_uid;         /* User ID */
        gid_t   pw_gid;         /* Group ID */
        char    *pw_gecos;      /* Name bzw. GECOS */
        char    *pw_dir;        /* Home-Verzeichnis */
        char    *pw_shell;      /* Loginshell */
};

 

RÜCKGABEWERT

Die Funktion getpwent() gibt die passwd-struktur zurück oder NULL, wenn keine weiteren Einträge vorhanden sind.  

FEHLER

ENOMEM
Es ist nicht ausreichend Speicher vorhanden, um Speicher für eine passwd-Struktur zu alloziieren.
 

DATEIEN

/etc/passwd
Paßwortdatenbank
 

KONFORM ZU

SVID 3, BSD 4.3  

SIEHE AUCH

fgetpwent(3), getpwnam(3), getpwuid(3), getpw(3), putpwent(3), passwd(5).


 

Index

BEZEICHNUNG
ÜBERSICHT
BESCHREIBUNG
RÜCKGABEWERT
FEHLER
DATEIEN
KONFORM ZU
SIEHE AUCH

 
 
 
 
Google
  Web Linuxinfor   
 

Home :: Copyright :: Privacy :: Credits :: Get a free Linuxinfor Email Account

Document on this page is part of "Linuxinfor Man Pages in HTML Format: man3". See Index Page for more info about Authorship and Copyright.

1999-2008 Linuxinfor.com. No rights reserved.