[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [RFC] adding system users: which is the best way??



On Sat, 29 Nov 2003, David B Harris wrote:

> On Sat, 29 Nov 2003 17:21:06 +0100 (CET)
> Fabio Massimo Di Nitto <fabbione@fabbione.net> wrote:
> > Peter noticed that some packages just add a user without asking the admin,
> > but we personally believe that the admin should be asked in advance for
> > which username will be added to the system, to avoid possible name
> > clashes.
> 
> If they use adduser, it will abort with an error if a user with the
> given name already exists. If such happens, I wouldn't mind a debconf
> prompt asking me if I'd prefer using a different username. However, the
> trend is to make daemons run under their very own UID - I don't want to
> get asked for usernames a dozen times during the installation. Thus, I'd
> suggest, "ask if the user already exists, otherwise proceed
> noninteractively."

How do you tell whether this user was created by a prior installation of
the package?  The typical snippet looks something like this

if ! getent passwd | grep -q '^foobar:'; then
  adduser --quiet --system --disabled-password --no-create-home --home /var/somewhere foobar
fi

Some packages remove the user when they are purged.  This is even worse
I think.

Peter
-- 
 PGP signed and encrypted  |  .''`.  ** Debian GNU/Linux **
    messages preferred.    | : :' :      The  universal
                           | `. `'      Operating System
 http://www.palfrader.org/ |   `-    http://www.debian.org/

Attachment: signature.asc
Description: Digital signature


Reply to: