On Fri, Oct 08, 2004 at 12:51:08PM +0100, Gavan Fantom wrote:
>
> There are some obvious possibilities here:
>
> * Stick with the status quo. This bites on Solaris, where installing any
> shell from pkgsrc will cause all users to be denied login by dtlogin.
>
> * Not update /etc/shells if it's not present. This is easy to do, but
> leaves users of the shells installed from pkgsrc unable to log in without
> intervention from the administrator.
>
> * Write a C program to use getusershell(3) to iterate the default set and
> generate a "default" /etc/shells on demand if it is not present. This
> would be a pain from a package's install script, and so would probably
> require a separate package as a dependency.
>
> * Extract the default list by other means, such as parsing the
> getusershell(3) manpage (ugh!)
>
> I think the third option is probably the best so far, but I worry about
> what happens in a NIS environment where getusershells(3) could go off and
> retrieve a remote database. Do we need to worry about this scenario? Does
> it even make sense to try to DTRT here?
>
> Does anybody have any better suggestions, or any pros/cons/votes for any
> of the above possibilities?
Make it part of the bootstrap process to generate a /etc/shells using
one of the techniques you described above. This hides away the complexity
in a single step and avoids needing all this extra knowledge in pkgsrc.
Cheers,
-- Johnny Lam <jlam@NetBSD.org>