putpwent(3C) manual page
Table of Contents
putpwent - write password file entry
#include <pwd.h>
int putpwent(const
struct passwd *p, FILE
*f);
Unsafe
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.
putpwent() returns non-zero if an error was detected during its operation,
otherwise zero.
getpwnam(3C)
, putspent(3C)
Do not use without
also using putspent() to update the shadow file.
The use of this function
is discouraged.
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.
Table of Contents