Subject: bin/4557: passwd erroneously requires -l flag if YP enabled
To: None <gnats-bugs@gnats.netbsd.org>
From: None <perseant@hitl.washington.edu>
List: netbsd-bugs
Date: 11/21/1997 09:01:12
>Number:         4557
>Category:       bin
>Synopsis:       passwd erroneously requires -l flag if YP enabled
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 21 09:05:02 1997
>Last-Modified:
>Originator:     Konrad Schroder
>Organization:
Human Interface Technology Laboratory
University of Washington, Seattle
>Release:        NetBSD 1.3_ALPHA sources from 1997.11.20
>Environment:
System: NetBSD danish 1.3_ALPHA NetBSD 1.3_ALPHA (GENERIC) #10: Mon Nov 17 19:51:14 PST 1997 root@atomic.clock.org:/usr/src/sys/arch/sparc/compile/GENERIC sparc
>Description:
If NIS is bound to a valid NIS domain, passwd is unable to change the password
of a user who is not listed in that domain but who is listed in the local
password file.  This is only implicitly contrary to the documentation (so it
might be a doc-bug instead) but it is contrary to the behavior on other Unices.
>How-To-Repeat:
Bind to a YP domain
Add +:0::::::: to /etc/master.passwd
"passwd root"
>Fix:
Work-around is to use "passwd -l" to change local passwords.  Proper fix would
involve small but non-trivial changes to passwd.c to discover a local passwd
entry if one exists, before blindly calling yp_passwd.

I haven't generated a patch because I'm unsure what the exact intended behavior
is if no flag is specified ("if local exists change local else change yp"
vs "if yp exists change yp else change local" vs the current
"if yp exists change yp else barf").
>Audit-Trail:
>Unformatted: