Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getpwent(3)

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(3). 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. 

DIAGNOSTICS

putpwent returns non-zero if an error was detected during its operation, otherwise zero. 

SEE ALSO

getpwent(3). 

WARNING

The above routine uses <stdio.h>, which causes it to increase 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 Yellow Pages files, and cannot be updated with this routine. 

Sun Release 3.5  —  Last change: 15 April 1986

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