Removing package fails to remove user

Bug #1185547 reported by Jonathan Harker
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt-cacher-ng (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When purging the apt-cacher-ng package, the apt-cacher-ng user is not removed from the system. This causes reinstalls to fail because the apt-cacher-ng user already exists. The package should remove the user when being purged.

Workaround:
After uninstalling, run the command:
sudo userdel apt-cacher-ng
Once the user is removed, the package can be installed again.

Version affected: 12.04.1 Precise
Package version: 0.7.2-1ubuntu2.1

Tags: patch
Revision history for this message
Eduard Bloch (edi-gmx) wrote :

It does already but only if deluser tool is available.

However, this is a minor bug because normally it does not hurt even if the user account remains on the system.

Why this you might ask? Because the installation normally does not fail since it's a system user account. Unless... somebody (YOU?) messed around with user id so it doesn't look like a system account anymore and in this case adduser can show erroneous behavior. Also see Debian bug #708073 .

Revision history for this message
Eduard Bloch (edi-gmx) wrote :
Revision history for this message
Jonathan Harker (jesusaurus) wrote :

Ah, I had no idea that it mattered if the user had a system id. It's very possible that my configuration management mucked about with the user id (or maybe even created the user instead of the package creating the user).

Thanks for clearing up the source of the error.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Little postrm modification to work without adduser tools" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

@Eduard: any reason why this can't be done via Debian?

Revision history for this message
Chris Halse Rogers (raof) wrote :

It's not entirely clear that the apt-cacher-ng user *should* be removed on package removal. See http://wiki.debian.org/AccountHandlingInMaintainerScripts for unresolved discussion of such ☺.

It's also worth noting that the patch as written will fail if adduser is installed *and* the apt-cacher-ng user is not a system user. You've traded an error on reinstall for an error on removal.

I've fixed a similar problem in colord recently by just checking whether the user exists before trying to create it in the postinst.

Finally, this does indeed seem like something that would also apply to debian - have you filed a Debian bug or contacted the maintainer about this?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt-cacher-ng - 0.7.14-1

---------------
apt-cacher-ng (0.7.14-1) unstable; urgency=low

  * New upstream version
    + prevents background looping (closes: #703296)
    + stop spamming apt-cacher.err when verbosity is not set to debug mode
      (closes: #714146)
  * Remove system user account with bare passwd tools where adduser package
    has been removed before purging apt-cacher-ng (LP: #1185547)

 -- Eduard Bloch <email address hidden> Sat, 20 Jul 2013 10:55:07 +0200

Changed in apt-cacher-ng (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.