1PUTPWENT(3)                Linux Programmer's Manual               PUTPWENT(3)
2
3
4

NAME

6       putpwent - write a password file entry
7

SYNOPSIS

9       #include <stdio.h>
10       #include <sys/types.h>
11       #include <pwd.h>
12
13       int putpwent(const struct passwd *p, FILE *stream);
14
15   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
16
17       putpwent(): _SVID_SOURCE
18

DESCRIPTION

20       The putpwent() function writes a password entry from the structure p in
21       the file associated with stream.
22
23       The passwd structure is defined in <pwd.h> as follows:
24
25           struct passwd {
26               char    *pw_name;        /* username */
27               char    *pw_passwd;      /* user password */
28               uid_t    pw_uid;         /* user ID */
29               gid_t    pw_gid;         /* group ID */
30               char    *pw_gecos;       /* real name */
31               char    *pw_dir;         /* home directory */
32               char    *pw_shell;       /* shell program */
33           };
34

RETURN VALUE

36       The putpwent() function returns 0 on success, or -1 if an error occurs.
37       In the event of an error, errno is set to indicate the cause.
38

ERRORS

40       EINVAL Invalid (NULL) argument given.
41

CONFORMING TO

43       SVr4.
44

SEE ALSO

46       endpwent(3),  fgetpwent(3),  getpw(3),  getpwent(3), getpwnam(3), getp‐
47       wuid(3), setpwent(3)
48

COLOPHON

50       This page is part of release 3.53 of the Linux  man-pages  project.   A
51       description  of  the project, and information about reporting bugs, can
52       be found at http://www.kernel.org/doc/man-pages/.
53
54
55
56GNU                               2013-04-19                       PUTPWENT(3)
Impressum