running pwd_mkdb from the startup scripts ?

Luigi Rizzo rizzo at icir.org
Mon Apr 26 09:43:32 PDT 2004


does anyone know what is a good place to run /usr/sbin/pwd_mkdb
from the startup scripts ? Alternatively, can I put a hook
in /etc/rc to run it if so specified by rc.conf ?
(i am interested in doing that for diskless environments, but the 
problem is general).

A good place i have seen is at the end of rc.diskless2 (or the
equivalent in -current), or at the beginning of rc.sysctl,
but that requires to override the entire file just to add one line.
 
Starting from rc.local or local_startup scripts is too late
because some daemons need a valid user database to work;
starting from /etc/rc.early is too early because /usr is not
mounted yet.
  
The problem is, if the [s]pwd.db and [master.]passwd files
are out of sync, the system trusts the binary version and not
the one-true-source which would be master.passwd, so in
certain cases it would be nice to have them resynced automatically
at boot time

        cheers
        luigi



More information about the freebsd-current mailing list