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

Peter Eisentraut peter_e at gmx.net
Fri Sep 2 09:50:18 UTC 2005


Package: adduser
Version: 3.67
Severity: normal

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.
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.




More information about the Adduser-devel mailing list