Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Dec 1995 21:33:55 -0500 (EST)
From:      A boy and his worm gear <wpaul@skynet.ctr.columbia.edu>
To:        rls@kilroy.id.net (Robert Shady)
Cc:        hackers@freebsd.org
Subject:   Re: Prob's w/YP Stuff
Message-ID:  <199512090233.VAA00771@skynet.ctr.columbia.edu>
In-Reply-To: <199512041900.OAA19588@server.id.net> from "Robert Shady" at Dec 4, 95 02:00:05 pm

next in thread | previous in thread | raw e-mail | index | archive | help
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 <user>' 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 <user>'
> 2) retrieve <users> info
> 3) if <users>.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.
=============================================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512090233.VAA00771>