From owner-freebsd-hackers Fri Dec 8 18:34:28 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id SAA15666 for hackers-outgoing; Fri, 8 Dec 1995 18:34:28 -0800 (PST) Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id SAA15659 for ; Fri, 8 Dec 1995 18:34:20 -0800 (PST) Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.11/8.6.9) id VAA00771; Fri, 8 Dec 1995 21:33:57 -0500 From: A boy and his worm gear Message-Id: <199512090233.VAA00771@skynet.ctr.columbia.edu> Subject: Re: Prob's w/YP Stuff To: rls@kilroy.id.net (Robert Shady) Date: Fri, 8 Dec 1995 21:33:55 -0500 (EST) Cc: hackers@freebsd.org In-Reply-To: <199512041900.OAA19588@server.id.net> from "Robert Shady" at Dec 4, 95 02:00:05 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-hackers@freebsd.org Precedence: bulk Of all the gin joints in all the world, Robert Shady had to walk into mine and say: > Has anybody else noticed that 'root' can't change someone's NIS password > using the 2.1.0-RELEASE yp stuff? Even if you edit /var/yp/master.passwd, > delete their old password, 'make', and try 'passwd ' it still asks > for the old password. Have I done something wrong, or is this a legitimate > bug? Er... it's sort of a bug. The only way for root to change any NIS password without actually knowning the existing password is to edit /var/yp/master.passwd and rebuild the maps. So by doing that, you did actually remove the user's password. When passwd(1) prompts you for the old password in this case, you can just press ENTER and then enter the new password. You did try that, right? The bug, if any, is that /usr/src/usr.bin/passwd/yp_passwd.c doesn't skip the 'Old Password' prompt when the old password is empty. I'll add this to the to do list. Ideally, root should be able to change any user's password using passwd on the NIS master server, but I haven't modified passwd yet to be able to do this. > Browsing the source code, it looks like what's supposed to happen is > > 1) 'passwd ' > 2) retrieve info > 3) if .password is blank & current.user=='root' then goto #5 This is probably for local_passwd.c, not yp_passwd.c. yp_passwd.c doesn't check for this. I suppose it probably should. :) -Bill -- ============================================================================= -Bill Paul (212) 854-6020 | System Manager Work: wpaul@ctr.columbia.edu | Center for Telecommunications Research Home: wpaul@skynet.ctr.columbia.edu | Columbia University, New York City ============================================================================= License error: The license for this .sig file has expired. You must obtain a new license key before any more witty phrases will appear in this space. =============================================================================