Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > P


HP-UX 11i Version 3: February 2007

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index


putpwent() — write password file entry


#include <pwd.h>

#include <stdio.h>

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


putpwent() is the inverse of getpwent() (see getpwent(3C)). Given a pointer to a passwd structure as created by getpwent(), getpwuid(), or getpwnam(); 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).


putpwent() returns non-zero if an error was detected during its operation; otherwise it returns zero.


HP-UX 11i Version 3 is the last release to support trusted systems functionality.



System Password file


putpwent(): SVID2, SVID3, XPG2

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.