remove csh(1)
[unleashed.git] / share / man / man3c / putpwent.3c
blob53c146156f8cdc8728a6c2c65f6a1eb40b56ecb9
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 1997, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PUTPWENT 3C "Dec 29, 1996"
7 .SH NAME
8 putpwent \- write password file entry
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <pwd.h>
14 \fBint\fR \fBputpwent\fR(\fBconst struct passwd *\fR\fIp\fR, \fBFILE *\fR\fIf\fR);
15 .fi
17 .SH DESCRIPTION
18 .sp
19 .LP
20 The \fBputpwent()\fR function is the inverse of \fBgetpwent()\fR. See
21 \fBgetpwnam\fR(3C). Given a pointer to a \fBpasswd\fR structure created by
22 \fBgetpwent()\fR, \fBgetpwuid()\fR, or \fBgetpwnam()\fR, \fBputpwent()\fR
23 writes a line on the stream \fIf\fR that matches the format of
24 \fB/etc/passwd\fR.
25 .SH RETURN VALUES
26 .sp
27 .LP
28 The \fBputpwent()\fR function returns a non-zero value if an error was detected
29 during its operation. Otherwise, it returns \fB0\fR.
30 .SH USAGE
31 .sp
32 .LP
33 The \fBputpwent()\fR function is of limited utility, since most password files
34 are maintained as Network Information Service (NIS) files that cannot be
35 updated with this function. For this reason, the use of this function is
36 discouraged. If used at all, it should be used with \fBputspent\fR(3C) to
37 update the shadow file.
38 .SH ATTRIBUTES
39 .sp
40 .LP
41 See \fBattributes\fR(5) for descriptions of the following attributes:
42 .sp
44 .sp
45 .TS
46 box;
47 c | c
48 l | l .
49 ATTRIBUTE TYPE  ATTRIBUTE VALUE
51 MT-Level        Unsafe
52 .TE
54 .SH SEE ALSO
55 .sp
56 .LP
57 \fBgetpwnam\fR(3C), \fBputspent\fR(3C), \fBattributes\fR(5)