]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/putpwent.3
Wrapped long lines, wrapped at sentence boundaries; stripped trailing
[thirdparty/man-pages.git] / man3 / putpwent.3
CommitLineData
fea681da
MK
1.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2.\"
3.\" Permission is granted to make and distribute verbatim copies of this
4.\" manual provided the copyright notice and this permission notice are
5.\" preserved on all copies.
6.\"
7.\" Permission is granted to copy and distribute modified versions of this
8.\" manual under the conditions for verbatim copying, provided that the
9.\" entire resulting derived work is distributed under the terms of a
10.\" permission notice identical to this one.
c13182ef 11.\"
fea681da
MK
12.\" Since the Linux kernel and libraries are constantly changing, this
13.\" manual page may be incorrect or out-of-date. The author(s) assume no
14.\" responsibility for errors or omissions, or for damages resulting from
15.\" the use of the information contained herein. The author(s) may not
16.\" have taken the same level of care in the production of this manual,
17.\" which is licensed free of charge, as they might when working
18.\" professionally.
c13182ef 19.\"
fea681da
MK
20.\" Formatted or processed versions of this manual, if unaccompanied by
21.\" the source, must acknowledge the copyright and authors of this work.
22.\"
23.\" References consulted:
24.\" Linux libc source code
25.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26.\" 386BSD man pages
27.\" Modified Sat Jul 24 18:43:46 1993 by Rik Faith (faith@cs.unc.edu)
28.TH PUTPWENT 3 1993-04-09 "GNU" "Linux Programmer's Manual"
29.SH NAME
30putpwent \- write a password file entry
31.SH SYNOPSIS
32.nf
33.B #include <stdio.h>
34.B #include <sys/types.h>
35.B #include <pwd.h>
36.sp
37.BI "int putpwent(const struct passwd *" p ", FILE *" stream );
38.fi
39.SH DESCRIPTION
63aa9df0 40The \fBputpwent\fP() function writes a password entry from the
fea681da
MK
41structure \fIp\fP in the file associated with \fIstream\fP.
42.PP
43The \fIpasswd\fP structure is defined in \fI<pwd.h>\fP as follows:
44.sp
b9f02710 45.in +0.5i
fea681da 46.nf
fea681da 47struct passwd {
b9f02710
MK
48 char *pw_name; /* user name */
49 char *pw_passwd; /* user password */
50 uid_t pw_uid; /* user ID */
51 gid_t pw_gid; /* group ID */
52 char *pw_gecos; /* real name */
53 char *pw_dir; /* home directory */
54 char *pw_shell; /* shell program */
fea681da
MK
55};
56.ta
57.fi
b9f02710 58.in -0.5i
fea681da 59.SH "RETURN VALUE"
63aa9df0 60The \fBputpwent\fP() function returns 0 on success, or \-1 if an error
fea681da
MK
61occurs.
62.SH ERRORS
63.TP
64.B EINVAL
65Invalid (NULL) argument given.
66.SH "CONFORMING TO"
68e1685c 67SVr4
fea681da
MK
68.SH "SEE ALSO"
69.BR endpwent (3),
70.BR fgetpwent (3),
71.BR getpw (3),
72.BR getpwent (3),
73.BR getpwnam (3),
74.BR getpwuid (3),
75.BR setpwent (3)