Re: Using the user nobody in my package
On Fri, Nov 17, 2006 at 08:25:18AM +0100, Michael Biebl wrote:
> Marc Haber wrote:
> > On Thu, Nov 16, 2006 at 01:41:30AM +0100, Michael Biebl wrote:
> >> I always use something like this in my postinst scripts
> >>
> >> if ! getent group foo > /dev/null ; then
> >> addgroup --quiet --system foo
> >> fi
> >>
> >> This avoids the warning/error message, if the group/user already exists.
> >
> > With my adduser maintainer hat on, that is not the way adduser is
> > intended to be used. We went to great lengths to make adduser useable
> > without any surrounding bugs^wcode.
>
> Interesting. But I'd say you failed to advertise this feature of adduser
> then. I just checked the postinst scripts in /var/lib/dpkg/info and
> basically every package that dealt with user/group creation had a stanza
> similar to the one above. So I was mostly documenting current best
> practice in my initial email.
> If indeed the recommended way nowadays is to use adduser without the
> surrounding check, maybe this should be documented somewhere, either the
> debian policy or the developers reference.
This is ongoing documentation work, see
http://wiki.debian.org/AccountHandlingInMaintainerScripts
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835
Reply to: