unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

PUTPWENT(3)                Library Functions Manual                PUTPWENT(3)



NAME
       putpwent - write password file entry

SYNOPSIS
       #include <&lt;pwd.h>&gt;

       int putpwent(p, f)
       struct passwd *p;
       FILE *f;

DESCRIPTION
       putpwent() is the inverse of getpwent(3V).  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 lines in the
       password file /etc/passwd.

FILES
       /etc/passwd

SEE ALSO
       getpwent(3V)

DIAGNOSTICS
       putpwent() returns non-zero if an error was detected during its  opera-
       tion, otherwise zero.

WARNING
       The above routine uses <&lt;stdio.h>&gt;, which increases the size of programs,
       not otherwise using standard I/O, more than might be expected.

BUGS
       This routine is of limited utility, since most password files are main-
       tained  as  Network  Information  Service  (NIS)  files,  and cannot be
       updated with this routine.

NOTES
       The Network Information Service (NIS) was formerly known as Sun  Yellow
       Pages  (YP).   The  functionality of the two remains the same; only the
       name has changed.



                                6 October 1987                     PUTPWENT(3)