Bug#4585: passwd is not NIS compatible
On Wed, 25 Sep 1996, Dominik Kubla wrote:
> When encountering NIS overide entries (like "+kubla::::::") while changing
> a local password, the programm will fill the empty fields with the string
> "(null)".
I can't duplicate this. On my system, `+kubla::::::' gets replaced
with `+kubla::0:0:::'. People knowledgable about NIS told me that was
ok.
The only thing I can think of that might be causing some problem is
your running a different libc with a broken fgetpwent(). I'm running
libc5_5.2.18-11. So please tell me which version you're running, and
also send me if the following code outputs anything besides
`+kubla::0:0:::'.
#include <pwd.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main() {
FILE *f;
struct passwd *p;
f = tmpfile();
fprintf(f, "+kubla::::::\n");
rewind(f);
p = fgetpwent(f);
if (!p->pw_passwd || *p->pw_passwd)
fprintf(stderr, "broken - %s\n", p->pw_passwd);
putpwent(p, stdout);
}
Guy
Reply to: