Subject: Re: VI and passwd Problem
To: None <crb@Glue.umd.edu>
From: None <Robert_Atkinson@ascend.com>
List: port-mac68k
Date: 03/18/1997 13:58:34
>> 1) I cannot change the passwd for root. Each time I do and try to login
I
>> get an "incorrect login" error (double and triple checking the password
>> entered each time). From which point I have to replace the file in /etc.

>> I can also not create a user, each time (using vipw) I get a similar
>> error. I was able to add a user once using "cpin" and "cpout" but then I
>> get an error that the user does not exist even though I do a "more" on
>> the passwd file and can see the entry with all the required info (login,
 UID, etc.).

>NetBSD uses a passwd database/shadow password file.  The contents of
/etc/passwd
>are not really used for logins.  In reality a binary database
>is built from /etc/passwd, and that is used instead.  If you use vipw
>it will automagically create a lock file so no other modifications can
occur
>to the password file, invoke vi on the passwd file, and run the program
that
>generates the binary password database from the edited plaintext
/etc/passwd file.

>MORAL: su to root and use passwd, or su to root and use vipw, you might
>also be able to delete the binary file, (its in /etc sonewhere, probably
>passwd.db or some such, I aint on a NetBSD machine right now) and
>see if the system will regenerate it from the plaintext /etc/passwd after
>a reboot.

I just want to make sure I understand this correctly; if I login as root
and then run passwd,
change the password, this should make the proper changes? Because these are
the steps I used
and then was not able to login as root, I was given the "login incorrect"
error after entering
the password.

>I have no clue about #2, I don't really even understand what is going
>wrong, want to try to describe it in more detail?

The basic issue is that I create or edit a file using vi and then when I
try and save and exit
vi the files doesn't exist, until I reboot. Matter of fact if I try and do
an "ls" in the directory (before rebooting) that the
file was created in I get nothing, even though there were other files in
the directory. Once I reboot
everything is displayed as it should be. I can do a "more" on the file
(after rebooting) I just created and all the content
is there.

Any clues? Thoughts? Could the problems be related?

>---------
>Christopher R. Bowman
>crb@Glue.umd.edu
>My home page

~~~~~~~~~~~~~~~~
Robert Atkinson
Ascend Communications
ratkinson@ascend.com