PUTPWENT(3C)
NAME
putpwent − write password file entry
SYNOPSIS
#include <pwd.h>
int putpwent (p, f)
struct passwd ∗p;
FILE ∗f;
DESCRIPTION
Putpwent is the inverse of getpwent(3C). Given a pointer to a passwd structure as created by getpwent (or getpwuid or getpwnam), putpwent writes a line on the stream f, which matches the format of /etc/passwd.
Putpwent ignores the audit ID and audit flag in the passwd structure; and does not create the corresponding entries used in the secure password file (/.secure/etc/passwd). Putspwent(LIBC) which produces entries that match the secure password file format, must be used to create these entries.
DIAGNOSTICS
Putpwent returns non-zero if an error was detected during its operation, otherwise zero.
SEE ALSO
getpwent(3C), putspwent(3C), passwd(4), spasswd(4).
STANDARDS CONFORMANCE
putpwent: SVID2, XPG2
Hewlett-Packard Company — HP-UX Release 7.0: Sept 1989