Subject: Passwd behaviour: Bug or feature?
To: None <netbsd-bugs@NetBSD.ORG>
From: Markus Kilbinger <kilbi@rad.rwth-aachen.de>
List: netbsd-bugs
Date: 02/06/1997 19:37:06
Hi!
First: We are using a complete -current NetBSD system of Feb-3-1997 on
some i386 machines.
After installing (vipw) a temporary local account on one of our NetBSD
machines I tried to change the accounts local password by simply
typing 'passwd [account]': --> 'passwd: unknown user [account]'!?
'man passwd' revealed:
This is the behavior if no flags are specified: If the password is not
in the local password database, then an attempt is made to use the YP
database. ...
Hmm, I had a look into passwd sources (passwd.c) and found:
[...]
#ifdef YP
use_yp = _yp_check(NULL);
#endif
[...]
#ifdef YP
if (use_yp)
exit(yp_passwd(username));
#endif
[...]
At least in the case of no specified option ;-).
--> If you have a running NIS _no_ automatical lookup in the local
passwd db is done! Calling 'passwd [username]' is equivalent to
'yppasswd [username]' in this case.
--> Beside the difference between man page and binary: What is wrong:
The program or the man page?
Markus.