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

 
 

 

GETPW

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

BEZEICHNUNG

getpw - Re-konstruiere eine Paßwortdateieintrag  

ÜBERSICHT

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

int getpw(uid_t uid, char *buf);  

BESCHREIBUNG

Die Funktion getpw() re-konstruiert eine Zeile in der Paßwortdatei im Puffer buf für die angegebene User ID uid. Der zurückgegebene Puffer enthält eine Zeile mit folgendem Format:

name:passwd:uid:gid:gecos:dir:shell

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 getpw() gibt bei Erfolg 0 zurück und -1, wenn ein Fehler aufgetreten ist.  

FEHLER

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

DATEIEN

/etc/passwd
Paßwortdatenbank
 

SIEHE AUCH

fgetpwent(3), getpwent(3), setpwent(3), endpwent(3), getpwnam(3), getpwuid(3), putpwent(3), passwd(5).


 

Index

BEZEICHNUNG
ÜBERSICHT
BESCHREIBUNG
RÜCKGABEWERT
FEHLER
DATEIEN
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.