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

DESCRIPTION

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

RETURN VALUE

32       The putpwent() function returns 0 on success, or -1 if an error occurs.
33

ERRORS

35       EINVAL Invalid (NULL) argument given.
36

CONFORMING TO

38       SVr4
39

SEE ALSO

41       endpwent(3), fgetpwent(3), getpw(3),  getpwent(3),  getpwnam(3),  getp‐
42       wuid(3), setpwent(3)
43
44
45
46GNU                               1993-04-09                       PUTPWENT(3)
Impressum