Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getpwent(3V)

PUTPWENT(3)  —  C LIBRARY FUNCTIONS

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(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 operation, otherwise zero. 

WARNING

The above routine uses <stdio.h>, 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 maintained as Network Information Service (NIS) files, and cannot be updated with this routine. 

NOTES

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

Solbourne Computer, Inc.  —  6 October 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026