Regenerating the password databases on new installs

Mayu Inc. pomomayu at gmail.com
Wed Feb 8 05:35:15 PST 2023


Awesome thanks! Appreciate the prompt response.

On Tue, Feb 7, 2023, 9:53 PM Aaron LI <aly at aaronly.me> wrote:

> Hi,
>
> I've looked at the installation doc and the code, and I can confirm this
> issue.
>
> It's caused by the inconsistency between the DBs (pwd.db and spwd.db) and
> the passwd files (i.e., master.passwd, passwd, group).  On the release
> ISO/IMG, there are '/etc' and '/etc.hdd' (the latter is copied to the
> installing machine).  During the release building, the 'installer' user was
> added to '/etc', but only the passwd files were copied to '/etc.hdd', and
> thus the aformentioned inconsistency.  And this inconsistency caused the
> adduser (pw adduser) issue here.
>
> And as you figured out, a rebuild of the DBs (pwd_mkdb) resolved the issue.
>
> So, I've updated the installation doc to add the missing pwd_mkdb step,
> which is actually performed by the installer.
>
> On the other hand, I'll try to improve the release build Makefile to
> eliminate the inconsistency as well.
>
> See also:
> https://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/nrelease/Makefile
> (lines 237-241, 328-331)
>
> Cheers,
> Aaron
>
> > On Feb 8, 2023, at 06:53, Mayu Inc. <pomomayu at gmail.com> wrote:
> >
> > 
> > We successfully installed new systems on a few different machines using
> the extended layout guide in the handbook to utilize pseudo filesystems. On
> every install we've had to re-generate the password databases or else new
> users are  visible in /etc/passwd but unable to login.
> >
> > The following error occured after creating a new user with the 'adduser'
> utility:
> >
> > pw: user 'myuser' disappeared during update.
> > adduser: ERROR: There was an error adding user (myuser).
> >
> > Using this work-around before creating any users seems to work:
> >
> >       # cp /etc/passwd /etc/passwd.orig
> >       # cp /etc/master.passwd /etc/master.passwd.orig
> >       # pwd_mkdb /etc/master.passwd
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20230208/85270dc7/attachment-0002.htm>


More information about the Users mailing list