Re: nscd confuses my preinst :-(
On Sun, Sep 26, 1999 at 11:11:27AM +0200, Christian Hammers wrote:
> On Sat, 25.09.99 10:21 +1000, Brian May wrote:
> > If useradd is the wrong program to use (thats my guess), then the same
> > functionality should (IMHO) be moved to adduser. That way you can
> > configure the user with one program call, and not worry about usermod.
> Oh no ! You missed the point ! :-)
My fault, sorry. I didn't really know what nscd is. I see it now:
Maintainer: Debian GNU C Library Maintainers <email@example.com>
Replaces: libc6 (<< 2.1-4)
Depends: libc6 (>= 2.1)
Description: GNU C Library: Name Service Cache Daemon
A daemon which handles passwd and group lookups
for running programs and caches the results for the next
query. You should install this package only if you use
slow Services like LDAP, NIS or NIS+
IMHO, adduser, usermod, etc should support different protocols, other
then just /etc/passwd and /etc/group. That way you could have adduser in
preinst scripts make a global ID that effects all computers, removing
one of the requirements for static IDs that was/is being debated on
Don't ask me how this would be implemented though ;-) I suspect the fact
that adduser and usermod are in different packages is only going to make
matters worse. (Are any over programs affected? eg chsh or chfn?
Perhaps these aren't as serious. )
However, on the topic of nscd, the only way I think you could
fix the problem is to either:
- force the cache to be flushed after making changes to original.
- write changes via cache.
(+any other method I have missed)
Does nscd make either of these methods possible?
> I was not talking about wheter or not using useradd or adduser - I have
> to use Debian's adduser and usermod to handle all cases where a user is
> preexisting, or a group is preexisting and the user not or both are there
> and they have a wrong shell etc....
useradd is also a Debian program:
 [snoopy:bam] ~/tmp >dpkg -S /usr/sbin/useradd
However, perhaps its use is now obsolete. It probably wouldn't be
any better though in this case.
Brian May <firstname.lastname@example.org>