Another option would be to have an activation snippet that runs when
booting the newly installed system: if would check for a flag or
something (it could check for uninitialized passwords), and if it
determines it’s a first boot, open a dialog box asking for passwords.
We’d need to add a “post-install” service in the OS config that would do
just that.
That would be the most robust approach, but it’s also a bit more work I
guess. It’s also not so nice that users will see this extra service in
their config.
Thoughts?
To which Florian replied:
Why can’t the installer just chroot into the new system and call
passwd?
That makes a lot of sense, I feel silly for not thinking about it. :-)
(In fact, we don’t even have to chroot since we can directly use (gnu
build accounts) to write the shadow file in the right place.)