putpwent
Purpose
Writes a password file entry.
Library
Standard I/O Library (libc.a)
Syntax
#include <pwd.h>
int putpwent (p, f)
struct passwd *p;
FILE *f;
Description
The putpwent subroutine writes a line on the stream spec-
ified by the f parameter. The stream that is written on
matches the format of /etc/passwd.
The p parameter is a pointer to a passwd structure
created by the getpwent, getpwuid, or getpwnam subrou-
tines.
Return Value
Upon successful completion, putpwent returns a value of
0. If putpwent fails, a nonzero value is returned.
Related Information
In this book: "getpwent, getpwuid, getpwnam, setpwent,
endpwent" and "passwd."