OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / ypserv / original / man8 / rpc.yppasswdd.8
1 .\"
2 .\" Copyright 1997, 1999 Thorsten Kukuk, <kukuk@suse.de>
3 .\" Copyright 1994, 1995, 1996 Olaf Kirch, <okir@monad.swb.de>
4 .\"
5 .\" This program is covered by the GNU General Public License, version 2.
6 .\" It is provided in the hope that it is useful. However, the author
7 .\" disclaims ALL WARRANTIES, expressed or implied. See the GPL for details.
8 .\"
9 .TH RPC.YPPASSWDD 8 "August 2001" "YP Server" ""
10 .SH NAME
11 rpc.yppasswdd \- NIS password update daemon
12 .SH SYNOPSIS
13 .B "rpc.yppasswdd [-D directory] [-e chsh|chfn] [--port number]"
14 .br
15 .B "rpc.yppasswdd [-s shadow] [-p passwd] [-e chsh|chfn] [--port number]"
16 .br
17 .B "rpc.yppasswdd -x program|-E program [-e chsh|chfn] [--port number]"
18
19 .SH DESCRIPTION
20 \fBrpc.yppasswdd\fP is the RPC server that lets users change their passwords
21 in the presence of NIS (a.k.a. YP). It must be run on the NIS master
22 server for that NIS domain.
23 .P
24 When a
25 .BR yppasswd (1)
26 client contacts the server, it sends the old user
27 password along with the new one. \fBrpc.yppasswdd\fP will search the system's
28 .B passwd
29 file for the specified user name, verify that the
30 given (old) password matches, and update the entry. If the user
31 specified does not exist, or if the password, UID or GID doesn't match
32 the information in the password file, the update request is rejected,
33 and an error returned to the client.
34 .P
35 If this version of the server is compiled with the CHECKROOT=1 option, the
36 password given is also checked against the systems root password.
37 .P
38 After updating the
39 .B passwd
40 file and returning a success notification
41 to the client, \fBrpc.yppasswdd\fP executes the \fBpwupdate\fP script that
42 updates the NIS server's \fBpasswd.*\fP and \fBshadow.byname\fP maps.
43 This script assumes all NIS maps are kept in directories named
44 .BI /var/yp/ nisdomain
45 that each contain a \fBMakefile\fP customized for that NIS domain. If no
46 such \fBMakefile\fP is found, the scripts uses the generic one in
47 \fB/var/yp\fP.
48 .SH OPTIONS
49 The following options are available:
50 .TP
51 .BI "\-D" " directory"
52 The
53 .B passwd
54 and
55 .B shadow
56 files are located under the specified directory path.
57 .B rpc.yppasswdd
58 will use this files, not
59 .B /etc/passwd
60 and
61 .B /etc/shadow.
62 This is useful if you do not want to give all users in the NIS database
63 automatic access to your NIS server.
64 .TP
65 .BI "\-E" " program"
66 Instead of rpc.yppasswdd editing the passwd & shadow files, the
67 specified program will be run to do the editing. The following
68 environment variables will be set for the program: YP_PASSWD_OLD,
69 YP_PASSWD_NEW, YP_USER, YP_GECOS, YP_SHELL. The program should return
70 an exit status of 0 if the change completes successfully, 1 if the
71 change completes successfully but pwupdate should not be run, and
72 otherwise if the change fails.
73 .TP
74 .BI "\-p" " passwdfile"
75 This options tells \fBrpc.yppasswdd\fP to use a different source file instead
76 of \fB/etc/passwd\fP This is useful if you do not want to give all users
77 in the NIS database automatic access to your NIS server.
78 .TP
79 .BI "\-s" " shadowfile"
80 This options tells \fBrpc.yppasswdd\fP to use a different source file instead
81 of \fB/etc/passwd\fP. See below for a brief discussion of shadow support.
82 .TP
83 .BI "\-e [chsh|chfn]"
84 By default, \fBrpc.yppasswdd\fP will not allow users to change the shell or
85 GECOS field of their \fBpasswd\fP entry. Using the \fB\-e\fP option,
86 you can enable either of these. Note that when enabling support for
87 \fBypchsh\fP(1), you have to list all shells users are allowed to
88 select in \fB/etc/shells\fP.
89 .TP
90 .BI "\-x program"
91 When the -x option is used, rpc.yppasswdd will not attempt to modify
92 any files itself, but will instead run the specified program, passing
93 to its stdin information about the requested operation(s).  There is
94 a defined protocol used to communicate with this external program, which
95 has total freedom in how it propagates the change request. See
96 below for more details on this.
97 .TP
98 .B "\-m"
99 Will be ignored, for compatibility with Solaris only.
100 .TP
101 .BI "\-\-port number"
102 rpc.yppasswdd will try to register itself to this port. This makes
103 it  possible to have a router filter packets to the NIS ports.
104 .TP
105 .B "\-v" "--version"
106 Prints the version number and if this package is compiled with the
107 CHECKROOT option.
108 .SH MISCELLANEOUS
109 .SS Shadow Passwords
110 Using Shadow passwords alongside NIS does not make too much sense, because
111 the supposedly inaccesible passwords now become readable through a simple
112 invocation of
113 .BR ypcat (1).
114 .P
115 Shadow support in \fBrpc.yppasswdd\fP does not mean that it offers a very
116 clever solution to this problem, it simply means that it can read and write
117 password entries in the system's
118 .B shadow
119 file.  You have to produce a
120 \fBshadow.byname\fP NIS map to distribute password information to your NIS
121 clients. \fBrpc.yppasswdd\fP will search at first in the \fB/etc/passwd\fP file
122 for the user and password. If it find's the user, but the password is "x"
123 and a \fB/etc/shadow\fP file exists, it will update the password in the
124 shadow map.
125 .SS Use of the -x option
126 The program should expect to read a single line from stdin, which is
127 formatted as follows:
128 .P
129 <username> o:<oldpass> p:<password> s:<shell> g:<gcos>\\n
130 .P
131 where any of the three fields [p, s, g] may or may not be present.
132 .P
133 This program should write "OK\\n" to stdout if the operation succeeded.  On
134 any other result, rpc.yppasswdd will report failure to the client.
135 .P
136 Note that the program specified by the -x option is responsible for doing
137 any NIS make and build, and for doing any necessary validation on the
138 shell and gcos field information supplied.  The password passed to the client
139 will be in UNIX crypt() format.
140 .SS Logging
141 \fBrpc.yppasswdd\fP logs all password update requests to \fBsyslogd(8)\fP's
142 auth facility. The logging information includes the originating host's
143 IP address and the user name and UID contained in the request. The
144 user-supplied password itself is not logged.
145 .SS Security
146 Unless I've screwed up completely (as I did with versions prior to
147 version\ 0.5), \fBrpc.yppasswdd\fP should be as secure or insecure as any
148 program relying on simple password authentication.  If you feel that
149 this is not enough, you may want to protect \fBrpc.yppasswdd\fP from outside
150 access by using the `securenets' feature of the new \fBportmap(8)\fP
151 version\ 3.  Better still, use Kerberos.
152 .SH COPYRIGHT
153 \fBrpc.yppasswdd\fP is copyright (C) Olaf Kirch. You can use and distribute it
154 under the GNU General Public License Version 2. Note that it does \fInot\fP
155 contain any code from the shadow password suite.
156 .SH FILES
157 \fB/usr/sbin/rpc.yppasswdd\fP
158 .br
159 \fB/usr/lib/yp/pwupdate\fP
160 .br
161 \fB/etc/passwd\fP
162 .br
163 \fB/etc/shadow\fP
164 .SH SEE ALSO
165 .BR passwd (5),
166 .BR shadow (5),
167 .BR passwd (1),
168 .BR yppasswd (1),
169 .BR ypchsh (1),
170 .BR ypchfn (1),
171 .BR ypserv (8),
172 .BR ypcat (1)
173 .LP
174 The Network Information Service
175 (\s-1NIS\s0)
176 was formerly known as Sun Yellow Pages
177 (\s-1YP\s0).
178 The functionality of the two remains the same;
179 only the name has changed.
180 The name Yellow Pages is a registered trademark in the United Kingdom
181 of British Telecommunications plc,
182 and may not be used without permission.
183 .SH AUTHOR
184 Olaf Kirch, <okir@monad.swb.de>
185 .br
186 Thorsten Kukuk, <kukuk@suse.de>