1putpwent(3C)             Standard C Library Functions             putpwent(3C)
2
3
4

NAME

6       putpwent - write password file entry
7

SYNOPSIS

9       #include <pwd.h>
10
11       int putpwent(const struct passwd *p, FILE *f);
12
13

DESCRIPTION

15       The putpwent() function is the inverse of getpwent(). See getpwnam(3C).
16       Given a pointer to a passwd  structure  created  by  getpwent(),  getp‐
17       wuid(),  or  getpwnam(),  putpwent() writes a line on the stream f that
18       matches the format of /etc/passwd.
19

RETURN VALUES

21       The putpwent() function returns  a  non-zero  value  if  an  error  was
22       detected during its operation. Otherwise, it returns 0.
23

USAGE

25       The  putpwent()  function  is  of  limited utility, since most password
26       files are maintained as Network Information Service  (NIS)  files  that
27       cannot  be updated with this function. For this reason, the use of this
28       function is discouraged. If used at all, it should be  used  with  put‐
29       spent(3C) to update the shadow file.
30

ATTRIBUTES

32       See attributes(5) for descriptions of the following attributes:
33
34
35
36
37       ┌─────────────────────────────┬─────────────────────────────┐
38       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
39       ├─────────────────────────────┼─────────────────────────────┤
40       │MT-Level                     │Unsafe                       │
41       └─────────────────────────────┴─────────────────────────────┘
42

SEE ALSO

44       getpwnam(3C), putspent(3C), attributes(5)
45
46
47
48SunOS 5.11                        29 Dec 1996                     putpwent(3C)
Impressum