SCCS-vsn: lib/libc/gen/getpwent.3 6.1
-.\" @(#)getpwent.3 5.1 (Berkeley) %G%
+.\" @(#)getpwent.3 6.1 (Berkeley) %G%
-.TH GETPWENT 3 "19 January 1983"
-getpwent, getpwuid, getpwnam, setpwent, endpwent \- get password file entry
+getpwent, getpwuid, getpwnam, setpwent, endpwent, setpwfile \- get password file entry
.SH SYNOPSIS
.nf
.B #include <pwd.h>
.SH SYNOPSIS
.nf
.B #include <pwd.h>
.B int setpwent()
.PP
.B int endpwent()
.B int setpwent()
.PP
.B int endpwent()
+.PP
+.B setpwfile(name)
+.B char *name;
.fi
.SH DESCRIPTION
.I Getpwent,
.fi
.SH DESCRIPTION
.I Getpwent,
.I endpwent
closes it.
.PP
.I endpwent
closes it.
.PP
+.I Setpwfile
+changes the default password file to
+.I name
+thus allowing alternate password files to be used.
+Note that it does
+.I not
+close the previous file.
+If this is desired,
+.I endpwent
+should be called prior to it.
+.PP
.I Getpwuid
and
.I getpwnam
.I Getpwuid
and
.I getpwnam