Subject: Re: Using the user nobody in my package
Date: Friday 17th November 2006 07:25:18 UTC (over 11 years ago)
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. Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?