[Adduser-devel] Bug#326192: adduser: adding system user with existing group fails

Marc Haber mh+debian-packages at zugschlus.de
Sat Sep 3 08:11:19 UTC 2005


tags #326192 wontfix
thanks

On Fri, Sep 02, 2005 at 11:50:18AM +0200, Peter Eisentraut wrote:
> The postgresql-common package does the following to add its system user
> "postgres":
> 
>     if ! getent passwd postgres > /dev/null; then
>         adduser --system --quiet --no-create-home --home /var/lib/postgresql --group --gecos "PostgreSQL administrator" pos
>     fi
> 
> I suppose this is common usage.
> 
> If, for whatever reason, the "postgres" group already exists, that call
> fails:
> 
>     adduser: The group `postgres' already exists.
> 
> ($? = 1)
> 
> As a consequence, the whole package installation fails in this case.

Which is a feature. adduser only silently adds a new system user to an
existing group if the existing group is a system group. If the
existing group is not a system group, adduser assumes that the group
name is locally being used for some thing else and refrains from
giving a new system user potential privileges on user data.

> That makes adduser --system --group a rather fragile combination.  I suggest
> that the existing group is not really an error and the new user should
> simply be added to the existing group.

adduser behaves that way if the existing group is a system group.

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




More information about the Adduser-devel mailing list