18256fad9SBill Paul.\" Copyright (c) 1995, 1996 28256fad9SBill Paul.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 38256fad9SBill Paul.\" 48256fad9SBill Paul.\" Redistribution and use in source and binary forms, with or without 58256fad9SBill Paul.\" modification, are permitted provided that the following conditions 68256fad9SBill Paul.\" are met: 78256fad9SBill Paul.\" 1. Redistributions of source code must retain the above copyright 88256fad9SBill Paul.\" notice, this list of conditions and the following disclaimer. 98256fad9SBill Paul.\" 2. Redistributions in binary form must reproduce the above copyright 108256fad9SBill Paul.\" notice, this list of conditions and the following disclaimer in the 118256fad9SBill Paul.\" documentation and/or other materials provided with the distribution. 128256fad9SBill Paul.\" 3. All advertising materials mentioning features or use of this software 138256fad9SBill Paul.\" must display the following acknowledgement: 148256fad9SBill Paul.\" This product includes software developed by Bill Paul. 158256fad9SBill Paul.\" 4. Neither the name of the author nor the names of contributors 168256fad9SBill Paul.\" may be used to endorse or promote products derived from this software 178256fad9SBill Paul.\" without specific prior written permission. 188256fad9SBill Paul.\" 198256fad9SBill Paul.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND 208256fad9SBill Paul.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 218256fad9SBill Paul.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 228256fad9SBill Paul.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR CONTRIBUTORS BE LIABLE 238256fad9SBill Paul.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 248256fad9SBill Paul.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 258256fad9SBill Paul.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 268256fad9SBill Paul.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 278256fad9SBill Paul.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 288256fad9SBill Paul.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 298256fad9SBill Paul.\" SUCH DAMAGE. 308256fad9SBill Paul.\" 318256fad9SBill Paul.Dd February 8, 1996 328256fad9SBill Paul.Dt RPC.YPPASSWDD 8 338256fad9SBill Paul.Os 348256fad9SBill Paul.Sh NAME 358256fad9SBill Paul.Nm rpc.yppasswdd 368256fad9SBill Paul.Nd "server for updating NIS passwords" 378256fad9SBill Paul.Sh SYNOPSIS 38e97407b4SRuslan Ermilov.Nm 398256fad9SBill Paul.Op Fl t Ar master.passwd template file 408256fad9SBill Paul.Op Fl d Ar default domain 418256fad9SBill Paul.Op Fl p Ar path 428256fad9SBill Paul.Op Fl s 438256fad9SBill Paul.Op Fl f 448256fad9SBill Paul.Op Fl a 458256fad9SBill Paul.Op Fl m 468b6a78c2SBill Paul.Op Fl i 478256fad9SBill Paul.Op Fl v 48589b8bfcSBill Paul.Op Fl u 498256fad9SBill Paul.Op Fl h 508256fad9SBill Paul.Sh DESCRIPTION 518256fad9SBill PaulThe 52fdd83901SPhilippe Charnier.Nm 53490d5836SPhilippe Charnierutility allows users to change their NIS passwords and certain 548256fad9SBill Paulother information using the 558256fad9SBill Paul.Xr yppasswd 1 568256fad9SBill Pauland 578256fad9SBill Paul.Xr ypchpass 1 588256fad9SBill Paulcommands. 59490d5836SPhilippe CharnierThe 60490d5836SPhilippe Charnier.Nm 61490d5836SPhilippe Charnierutility 628256fad9SBill Paulis an RPC-based server that accepts incoming password change requests, 638256fad9SBill Paulauthenticates them, places the updated information in the 648256fad9SBill Paul.Pa /var/yp/master.passwd 658256fad9SBill Paultemplate file and then updates the NIS 668256fad9SBill Paul.Pa master.passwd 678256fad9SBill Pauland 688256fad9SBill Paul.Pa passwd 698256fad9SBill Paulmaps. 708256fad9SBill Paul.Pp 718256fad9SBill PaulThe 72fdd83901SPhilippe Charnier.Nm 73490d5836SPhilippe Charnierutility allows a normal NIS user to change 748256fad9SBill Paulhis or her NIS password, full name (also 75f2e366a1SSheldon Hearnknown as 'GECOS' field) or shell. 76f2e366a1SSheldon HearnThese updates are typically done using 778256fad9SBill Paulthe 788256fad9SBill Paul.Xr yppasswd 1 , 798256fad9SBill Paul.Xr ypchfn 1 , 808256fad9SBill Paul.Xr ypchsh 1 , 818256fad9SBill Paulor 828256fad9SBill Paul.Xr ypchpass 1 834e86fcacSSheldon Hearncommands. 840227791bSRuslan Ermilov(Some administrators do not want users to be able to change their 858256fad9SBill Paulfull name information or shells; the server can be invoked with option flags 864e86fcacSSheldon Hearnthat disallow such changes.) 874e86fcacSSheldon HearnWhen the server receives an update request, 88589b8bfcSBill Paulit compares the address of the client making the request against the 89589b8bfcSBill Paul.Pa securenets 90589b8bfcSBill Paulrules outlined in 91589b8bfcSBill Paul.Pa /var/yp/securenets . 92589b8bfcSBill Paul(See the 93589b8bfcSBill Paul.Xr ypserv 8 94589b8bfcSBill Paulmanual page for more information on securenets; the 95fdd83901SPhilippe Charnier.Nm 96490d5836SPhilippe Charnierutility uses the same access control mechanism as 97589b8bfcSBill Paul.Xr ypserv 8 . ) 98589b8bfcSBill Paul.Pp 99589b8bfcSBill PaulThe server then 10036a142c4SRuslan Ermilovchecks the 'old' password supplied by the user to make sure it is 1018256fad9SBill Paulvalid, then performs some sanity checks on the updated information (these 1028256fad9SBill Paulinclude checking for embedded control characters, colons or invalid shells). 1038256fad9SBill PaulOnce it is satisfied that the update request is valid, the server modifies 1048256fad9SBill Paulthe template password file (the default is 1058256fad9SBill Paul.Pa /var/yp/master.passwd ) 1068256fad9SBill Pauland then runs the 1078256fad9SBill Paul.Pa /usr/libexec/yppwupdate 1084e86fcacSSheldon Hearnscript to rebuild the NIS maps. 1094e86fcacSSheldon Hearn(This script has two arguments passed 1108256fad9SBill Paulto it: the absolute pathname of the password template that was modified 111f2e366a1SSheldon Hearnand the name of the domain that is to be updated. 112f2e366a1SSheldon HearnThese in turn are 1138256fad9SBill Paulpassed to 114edf0e5b3SMike Pritchard.Pa /var/yp/Makefile ) . 1158256fad9SBill Paul.Pp 116fdd83901SPhilippe CharnierThe 117b5c508fbSRuslan Ermilov.Fx 118fdd83901SPhilippe Charnierversion of 119fdd83901SPhilippe Charnier.Nm 1208256fad9SBill Paulalso allows the super-user on the NIS master server to perform more 121f2e366a1SSheldon Hearnsophisticated updates on the NIS passwd maps. 122f2e366a1SSheldon HearnThe super-user can modify 1238256fad9SBill Paulany field in any user's master.passwd entry in any domain, and can 1248256fad9SBill Pauldo so without knowing the user's existing NIS password (when the server 1258256fad9SBill Paulreceives a request from the super-user, the password authentication 12607bfccd7SRuslan Ermilovcheck is bypassed). 12707bfccd7SRuslan ErmilovFurthermore, if the server is invoked with the 1288256fad9SBill Paul.Fl a 1298256fad9SBill Paulflag, the super-user can even add new entries to the maps using 1308256fad9SBill Paul.Xr ypchpass 1 . 1318256fad9SBill PaulAgain, this only applies to the super-user on the NIS 13257bd0fc6SJens Schweikhardtmaster server: none of these special functions can be performed over 1338256fad9SBill Paulthe network. 1348256fad9SBill Paul.Pp 1358256fad9SBill PaulThe 136fdd83901SPhilippe Charnier.Nm 137490d5836SPhilippe Charnierutility can only be run on a machine that is an NIS master server. 1388256fad9SBill Paul.Sh OPTIONS 139fdd83901SPhilippe CharnierThe following options are available: 140fdd83901SPhilippe Charnier.Bl -tag -width indent 1418256fad9SBill Paul.It Fl t Ar master.passwd template file 1428256fad9SBill PaulBy default, 143fdd83901SPhilippe Charnier.Nm 1448256fad9SBill Paulassumes that the template file used to generates the 1458256fad9SBill Paul.Pa master.passwd 1468256fad9SBill Pauland 1478256fad9SBill Paul.Pa passwd 1488256fad9SBill Paulmaps for the default domain is called 1498256fad9SBill Paul.Pa /var/yp/master.passwd . 1508256fad9SBill PaulThis default can be overridden by specifying an alternate file name 1518256fad9SBill Paulwith the 1528256fad9SBill Paul.Fl t 1538256fad9SBill Paulflag. 1548256fad9SBill Paul.Pp 1558256fad9SBill PaulNote: if the template file specified with this flag is 1568256fad9SBill Paul.Pa /etc/master.passwd , 157fdd83901SPhilippe Charnier.Nm 1588256fad9SBill Paulwill also automatically invoke 1598256fad9SBill Paul.Xr pwd_mkdb 8 1608256fad9SBill Paulto rebuild the local password databases in addition to the NIS 1618256fad9SBill Paulmaps. 1628256fad9SBill Paul.It Fl d Ar domain 1638256fad9SBill PaulThe 164fdd83901SPhilippe Charnier.Nm 165490d5836SPhilippe Charnierutility can support multiple domains, however it must 1668256fad9SBill Paulchoose one domain as a default. 1678256fad9SBill PaulIt will try to use the system default domain name as set by the 1688256fad9SBill Paul.Xr domainname 1 169f2e366a1SSheldon Hearncommand for this default. 170f2e366a1SSheldon HearnHowever, 1718256fad9SBill Paulif the system domain name is not 1728256fad9SBill Paulset, a default domain must be specified on 173f2e366a1SSheldon Hearnthe command line. 174f2e366a1SSheldon HearnIf the system default domain is set, 1758256fad9SBill Paulthen this option can be used to override it. 1768256fad9SBill Paul.It Fl p Ar path 1778256fad9SBill PaulThis option can be used to override the default path to 1788256fad9SBill Paulthe location of the NIS 179f2e366a1SSheldon Hearnmap databases. 180f2e366a1SSheldon HearnThe compiled-in default path is 1818256fad9SBill Paul.Pa /var/yp . 1828256fad9SBill Paul.It Fl s 1838256fad9SBill PaulDisallow changing of shell information. 1848256fad9SBill Paul.It Fl f 1858256fad9SBill PaulDisallow changing of full name ('GECOS') information. 1868256fad9SBill Paul.It Fl a 187f2e366a1SSheldon HearnAllow additions to be made to the NIS passwd databases. 188f2e366a1SSheldon HearnThe super-user on the 1898256fad9SBill PaulNIS master server is permitted to use the 1908256fad9SBill Paul.Xr ypchpass 1 1918256fad9SBill Paulcommand to perform unrestricted modifications to any field in a user's 1928256fad9SBill Paul.Pa master.passwd 193f2e366a1SSheldon Hearnmap entry. 194f2e366a1SSheldon HearnWhen 195fdd83901SPhilippe Charnier.Nm 1968256fad9SBill Paulis started with this flag, it will also allow the super-user to add new 1978256fad9SBill Paulrecords to the NIS passwd maps, just as is possible when using 1988256fad9SBill Paul.Xr chpass 1 1998256fad9SBill Paulto modify the local password database. 2008256fad9SBill Paul.It Fl m 201f2e366a1SSheldon HearnTurn on multi-domain mode. 202f2e366a1SSheldon HearnEven though 2038256fad9SBill Paul.Xr ypserv 8 2048256fad9SBill Paulcan handle several simultaneous domains, most implementations of 205fdd83901SPhilippe Charnier.Nm 2068256fad9SBill Paulcan only operate on a single NIS domain, which is generally the same as 207f2e366a1SSheldon Hearnthe system default domain of the NIS master server. 208f2e366a1SSheldon HearnThe 209b5c508fbSRuslan Ermilov.Fx 210fdd83901SPhilippe Charnier.Nm 2118256fad9SBill Paulattempts to overcome this problem in spite of the inherent limitations 2128256fad9SBill Paulof the 2138256fad9SBill Paul.Pa yppasswd 2148256fad9SBill Paulprotocol, which does not allow for a 2158256fad9SBill Paul.Pa domain 216f2e366a1SSheldon Hearnargument in client requests. 217f2e366a1SSheldon HearnIn multi-domain mode, 218fdd83901SPhilippe Charnier.Nm 2198256fad9SBill Paulwill search through all the passwd maps of all the domains it 2208256fad9SBill Paulcan find under 2218256fad9SBill Paul.Pa /var/yp 2228256fad9SBill Pauluntil it finds an entry that matches the user information specified in 2234e86fcacSSheldon Hearna given update request. 2244e86fcacSSheldon Hearn(Matches are determined by checking the username, 2254e86fcacSSheldon HearnUID and GID fields.) 2264e86fcacSSheldon HearnThe matched entry and corresponding domain are then 2278256fad9SBill Paulused for the update. 2288256fad9SBill Paul.Pp 2298256fad9SBill PaulNote that in order for multi-domain mode to work, there have to be 2301a6e52d0SJeroen Ruigrok van der Wervenseparate template files for each domain. 231f2e366a1SSheldon HearnFor example, if a server 2328256fad9SBill Paulsupports three domains, 2338256fad9SBill Paul.Pa foo , 2348256fad9SBill Paul.Pa bar , 2358256fad9SBill Pauland 2368256fad9SBill Paul.Pa baz , 2371a6e52d0SJeroen Ruigrok van der Werventhere should be three separate master.passwd template files called 2388256fad9SBill Paul.Pa /var/yp/foo/master.passwd , 2398256fad9SBill Paul.Pa /var/yp/bar/master.passwd , 2408256fad9SBill Pauland 2418256fad9SBill Paul.Pa /var/yp/baz/master.passwd . 2428256fad9SBill PaulIf 2438256fad9SBill Paul.Pa foo 2448256fad9SBill Paulhappens to be the system default domain, then its template file can 2458256fad9SBill Paulbe either 2468256fad9SBill Paul.Pa /var/yp/foo/master.passwd 2478256fad9SBill Paulor 2488256fad9SBill Paul.Pa /var/yp/master.passwd . 2498256fad9SBill PaulThe server will check for the latter file first and then use the former 2500227791bSRuslan Ermilovif it cannot find it. 2518256fad9SBill Paul.Pp 2528256fad9SBill PaulMulti-domain mode is off by default since it can fail if there are 253f2e366a1SSheldon Hearnduplicate or near-duplicate user entries in different domains. 254f2e366a1SSheldon HearnThe server 2558256fad9SBill Paulwill abort an update request if it finds more than one user entry that 256f2e366a1SSheldon Hearnmatches its search criteria. 257f2e366a1SSheldon HearnEven so, paranoid administrators 2588256fad9SBill Paulmay wish to leave multi-domain mode disabled. 2598b6a78c2SBill Paul.It Fl i 2608b6a78c2SBill PaulIf 261fdd83901SPhilippe Charnier.Nm 262f2e366a1SSheldon Hearnis invoked with this flag, it will perform map updates in place. 263f2e366a1SSheldon HearnThis 2648b6a78c2SBill Paulmeans that instead of just modifying the password template file and 2658b6a78c2SBill Paulstarting a map update, the server will modify the map databases 266f2e366a1SSheldon Hearndirectly. 267f2e366a1SSheldon HearnThis is useful when the password maps are large: if, for 2688b6a78c2SBill Paulexample, the password database has tens of thousands of entries, it 269f2e366a1SSheldon Hearncan take several minutes for a map update to complete. 270f2e366a1SSheldon HearnUpdating the 2718b6a78c2SBill Paulmaps in place reduces this time to a few seconds. 2728256fad9SBill Paul.It Fl v 273f2e366a1SSheldon HearnTurn on verbose logging mode. 274f2e366a1SSheldon HearnThe server normally only logs messages 2758256fad9SBill Paulusing the 2768256fad9SBill Paul.Xr syslog 3 2778256fad9SBill Paulfacility when it encounters an error condition, or when processing 278f2e366a1SSheldon Hearnupdates for the super-user on the NIS master server. 279f2e366a1SSheldon HearnRunning the server 2808256fad9SBill Paulwith the 2818256fad9SBill Paul.Fl v 2828256fad9SBill Paulflag will cause it to log informational messages for all updates. 283589b8bfcSBill Paul.It Fl u 284589b8bfcSBill PaulMany commercial 285589b8bfcSBill Paul.Xr yppasswd 1 286589b8bfcSBill Paulclients do not use a reserved port when sending requests to 287e97407b4SRuslan Ermilov.Nm . 288589b8bfcSBill PaulThis is either because the 289589b8bfcSBill Paul.Xr yppasswd 1 290589b8bfcSBill Paulprogram is not installed set-uid root, or because the RPC 291589b8bfcSBill Paulimplementation does not place any emphasis on binding to reserved 292589b8bfcSBill Paulports when establishing client connections for the super-user. 293589b8bfcSBill PaulBy default, 294fdd83901SPhilippe Charnier.Nm 295589b8bfcSBill Paulexpects to receive requests from clients using reserved ports; requests 296f2e366a1SSheldon Hearnreceived from non-privileged ports are rejected. 297f2e366a1SSheldon HearnUnfortunately, this 298589b8bfcSBill Paulbehavior prevents any client systems that to not use privileged 299a48060a2SDima Dorfmanports from successfully submitting password updates. 300f2e366a1SSheldon HearnSpecifying 301589b8bfcSBill Paulthe 302589b8bfcSBill Paul.Fl u 303589b8bfcSBill Paulflag to 304fdd83901SPhilippe Charnier.Nm 305589b8bfcSBill Pauldisables the privileged port check so that it will work with 306589b8bfcSBill Paul.Xr yppasswd 1 3070227791bSRuslan Ermilovclients that do not use privileged ports. 308f2e366a1SSheldon HearnThis reduces security to 309589b8bfcSBill Paula certain small degree, but it might be necessary in cases where it 310589b8bfcSBill Paulis not possible to change the client behavior. 3118256fad9SBill Paul.It Fl h 312fdd83901SPhilippe CharnierDisplay the list of flags and options understood by 313e97407b4SRuslan Ermilov.Nm . 3148256fad9SBill Paul.El 3158256fad9SBill Paul.Sh FILES 3168256fad9SBill Paul.Bl -tag -width Pa -compact 3178256fad9SBill Paul.It Pa /usr/libexec/yppwupdate 3188256fad9SBill PaulThe script invoked by 319fdd83901SPhilippe Charnier.Nm 3208256fad9SBill Paulto update and push the NIS maps after 3218256fad9SBill Paulan update. 3228256fad9SBill Paul.It Pa /var/yp/master.passwd 3238256fad9SBill PaulThe template password file for the default domain. 3248256fad9SBill Paul.It Pa /var/yp/[domainname]/[maps] 3258256fad9SBill PaulThe NIS maps for a particular NIS domain. 3268256fad9SBill Paul.It Pa /var/yp/[domainname]/master.passwd 3278256fad9SBill PaulThe template password file(s) for non-default domains 3288256fad9SBill Paul(used only in multi-domain mode). 3298256fad9SBill Paul.El 3308256fad9SBill Paul.Sh SEE ALSO 331491a8429SRuslan Ermilov.Xr yp 8 , 3328256fad9SBill Paul.Xr yppush 8 , 333bfd34a4aSWolfram Schneider.Xr ypserv 8 , 334bfd34a4aSWolfram Schneider.Xr ypxfr 8 33559a3c79dSRuslan Ermilov.Sh AUTHORS 336*01c2b8acSBaptiste Daroussin.An Bill Paul Aq Mt wpaul@ctr.columbia.edu 3378256fad9SBill Paul.Sh BUGS 3388256fad9SBill PaulAs listed in the yppasswd.x protocol definition, the YPPASSWDPROC_UPDATE 3398256fad9SBill Paulprocedure takes two arguments: a V7-style passwd structure containing 3408256fad9SBill Paulupdated user information and the user's existing unencrypted (cleartext) 341f2e366a1SSheldon Hearnpassword. 342f2e366a1SSheldon HearnSince 343fdd83901SPhilippe Charnier.Nm 3448256fad9SBill Paulis supposed to handle update requests from remote NIS client machines, 3458256fad9SBill Paulthis means that 3468256fad9SBill Paul.Xr yppasswd 1 3478256fad9SBill Pauland similar client programs will in fact be transmitting users' cleartext 3488256fad9SBill Paulpasswords over the network. 3498256fad9SBill Paul.Pp 3508256fad9SBill PaulThis is not a problem for password updates since the plaintext password 3518256fad9SBill Paulsent with the update will no longer be valid once the new encrypted password 3528256fad9SBill Paulis put into place, but if the user is only updating his or her 'GECOS' 3538256fad9SBill Paulinformation or shell, then the cleartext password sent with the update 354f2e366a1SSheldon Hearnwill still be valid once the update is completed. 355f2e366a1SSheldon HearnIf the network is 3568256fad9SBill Paulinsecure, this cleartext password could be intercepted and used to 3578256fad9SBill Paulgain unauthorized access to the user's account. 358