Imported tab->space correction by redhat
[infodrom/manpages-de] / man3 / getpwnam.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one
11 .\" 
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\" 
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\"
28 .\" Modified Sat Jul 24 19:20:36 1993 by Rik Faith (faith@cs.unc.edu)
29 .\" Modified Mon May 27 21:37:47 1996 by Martin Schulze (joey@linux.de)
30 .\" Translated into german by Martin Schulze (joey@finlandia.infodrom.north.de)
31 .\"
32 .TH GETPWNAM 3 "27. Mai 1996" "GNU" "Bibliotheksfunktionen"
33 .SH BEZEICHNUNG
34 getpwnam, getpwuid \- arbeite mit Passworteintrag
35 .SH "ÜBERSICHT"
36 .nf
37 .B #include <pwd.h>
38 .B #include <sys/types.h>
39 .sp
40 .BI "struct passwd *getpwnam(const char * " name );
41 .sp
42 .BI "struct passwd *getpwuid(uid_t " uid );
43 .fi
44 .SH BESCHREIBUNG
45 Die Funktion
46 .B getpwnam()
47 gibt einen Zeiger auf eine Struktur zurück, die den Inhalt der Zeile
48 von
49 .I /etc/passwd
50 repräsentiert, die dem Benutzernamen
51 .I name
52 entspricht.
53
54 Die Funktion
55 .B getpwnam()
56 gibt einen Zeiger auf eine Struktur zurück, die den Inhalt der Zeile
57 von
58 .I /etc/passwd
59 repräsentiert, die der User ID
60 .I uid
61 entspricht.
62
63 Die Struktur
64 .I passwd
65 ist in
66 .I <pwd.h>
67 wie folgt definiert:
68 .sp
69 .RS
70 .nf
71 .ta 8n 16n 32n
72 struct passwd {
73         char    *pw_name;               /* Benutzername */
74         char    *pw_passwd;             /* Passwort */
75         uid_t   pw_uid;                 /* User ID */
76         gid_t   pw_gid;                 /* Group ID */
77         char    *pw_gecos;              /* Name bzw. GECOS */
78         char    *pw_dir;                /* Home-Verzeichnis */
79         char    *pw_shell;              /* Loginshell */
80 };
81 .ta
82 .fi
83 .RE
84 .SH "RÜCKGABEWERT"
85 Die Funktionen
86 .B getpwnam()
87 und
88 .B getpwuid()
89 geben die
90 .IR passwd \-struktur
91 zurück oder NULL, wenn kein passender Eintrag gefunden wurde oder ein
92 anderer Fehler aufgetreten ist.
93 .SH FEHLER
94 .TP
95 .B ENOMEM
96 Es ist nicht ausreichend Speicher vorhanden, um Speicher für eine
97 .IR passwd \-Struktur
98 zu alloziieren.
99 .SH DATEIEN
100 .TP
101 .I /etc/passwd
102 Passwortdatenbank
103 .fi
104 .SH "KONFORM ZU"
105 SVID 3, POSIX, BSD 4.3
106 .SH "SIEHE AUCH"
107 .BR fgetpwent (3),
108 .BR getpwent (3),
109 .BR setpwent (3),
110 .BR endpwent (3),
111 .BR getpw (3),
112 .BR putpwent (3),
113 .BR passwd (5).