putpwent(3C)
NAME
putpwent − write password file entry
SYNOPSIS
#include <pwd.h>
int putpwent(const struct passwd ∗p, FILE ∗f);
MT-LEVEL
Unsafe
DESCRIPTION
putpwent() is the inverse of getpwent(), (see getpwnam(3C)). Given a pointer to a passwd structure created by getpwent() (or getpwuid() or getpwnam()), putpwent() writes a line on the stream f, which matches the format of /etc/passwd.
RETURN VALUES
putpwent() returns non-zero if an error was detected during its operation, otherwise zero.
SEE ALSO
NOTES
Do not use without also using putspent() to update the shadow file.
The use of this function is discouraged.
BUGS
This routine is of limited utility, since most password files are maintained as Network Information Service (NIS) files, and cannot be updated with this routine.
SunOS 5.5/x86 — Last change: 22 Jan 1993