Date: Mon, 26 Apr 2004 09:43:31 -0700 From: Luigi Rizzo <rizzo@icir.org> To: current@freebsd.org Subject: running pwd_mkdb from the startup scripts ? Message-ID: <20040426094331.A47077@xorpc.icir.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040426094331.A47077>