Subject: Re: creating a user - password problem?
To: Bernd Limbach <BeLi@aventa.de>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-help
Date: 03/13/2001 14:44:44
On Tue, 13 Mar 2001, Bernd Limbach wrote:

> Creating the user looks fine, but whenever I want to login as this user I
> only get "Login incorrect". This is the result without a reboot (not sure if
> the is necessary, I don't think so).

You are right -- a reboot is not necessary.

> This _is_ actually the case when I do _not_ use the "-p" option of
> useradd(8). I would assume mthat in this case no password is set and the new
> user can login without a password.
> 
> Q1: Is this correct?

You can check for yourself by looking at the master.password file. You can
learn about the format by reading the master.passwd man page. Does the
second field have gibberish or just a "*" (or a plain, readable text)?

> Whenever I _use_ the -p <do_not_tell_you> I would expect that NetBSD will
> create the user using the given password <do_not_tell_you>. This seems to be
> not correct, because whenever I try to login under this scenario I get the
> same error message "Login incorrect".
> 
> Q2: What happened here? I gave a password, but I can not log in? Encryption?

You do not use "-p" with a plain text password. You must encrypt it
first.

> Whenever I set the variable in "/etc/usermgmt.conf" to some value like
> <do_not_tell_you>, this also has now effect like using the "-p" option of
> useradd(8).

You need to make sure that this is encrypted also.

For example, if your new users' password is "<do_not_tell_you>" then maybe
you could use "RKcHgui/G5H6s".

   Jeremy C. Reed
   http://www.reedmedia.net/