HP-UX Reference (11i v1 00/12) - 3 Library Functions N-Z (vol 7)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/nan.3m
________________________________________________________________
___ ___
p
putpwent(3C) putpwent(3C)
NAME
putpwent() - write password file entry
SYNOPSIS
#include <pwd.h>
#include <stdio.h>
int putpwent(const struct passwd *p, FILE *f);
DESCRIPTION
putpwent() is the inverse of getpwent() (see getpwent(3C)). Given a pointer to a passwd struc-
ture as created by getpwent(), getpwuid() ,orgetpwnam(); 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 protected password database, used for trusted systems.
putprpwnam() , which produces entries that match the trusted password database file format, must be
used to create these entries. See getprpwent(3).
APPLICATION USAGE
putpwent() is thread-safe. It is not async-cancel-safe. A cancellation point may occur when a thread is
executing putpwent() .
DIAGNOSTICS
putpwent() returns non-zero if an error was detected during its operation; otherwise it returns zero.
FILES
/etc/passwd System Password file
SEE ALSO
getpwent(3C), getprpwent(3), passwd(4), prpwd(4), stdio(3S), fopen(3S).
STANDARDS CONFORMANCE
putpwent(): SVID2, SVID3, XPG2
Section 3734 1 HP-UX Release 11i: December 2000
___
___