[Adduser-devel] Bug#759740: apt-cache-ng: user apt-cacher-ng already exists error when upgrading
Eduard Bloch
edi at gmx.de
Thu Sep 4 05:10:39 UTC 2014
Hallo,
* Andrew Patterson [Wed, Sep 03 2014, 12:53:32PM]:
> One possible complication I may be running into is that I am using
> LDAP for user accounts with uid > 2000, which would fail if
> apt-cacher-ng was trying to create a user in the range. But I think
> the problem here is solely that the account already exists and the
> code should be more like:
>
>
> if [ "$1" = "configure" ]; then
>
> if getent passwd $NAME; then
> : # Or pehaps remove the user and re-add.
> else
> adduser --quiet --system --group --no-create-home --home $CDIR $NAME
> fi
I don't know. And as I mentioned before, feel free to use the backport
version. It contains a quick workaround for a similar situation:
# user should exist. adduser sometimes fails (system range issue) but that's ok
adduser --quiet --system --group --no-create-home --home "$CDIR" $NAME || id $NAME
Regards,
Eduard.
More information about the Adduser-devel
mailing list