Comment 2 for bug 1920217

Revision history for this message
Bryce Harrington (bryce) wrote :

Confirmed the behavior in a hirsute LXC container:

    Setting up libtfm1:amd64 (0.13-4) ...
    Setting up libclamav9:amd64 (0.103.0+dfsg-3.1) ...
    Setting up clamav-base (0.103.0+dfsg-3.1) ...
    id: ‘clamav’: no such user
    Setting up clamav-freshclam (0.103.0+dfsg-3.1) ...
    Created symlink /etc/systemd/system/multi-user.target.wants/clamav-freshclam.service → /lib/systemd/system/clamav-fre
    shclam.service.
    Setting up clamav (0.103.0+dfsg-3.1) ...
    Processing triggers for man-db (2.9.4-2) ...
    Processing triggers for libc-bin (2.33-0ubuntu2) ...

Ditto for groovy and focal.

The user is getting created though:

    triage-focal+20.04:~$ id clamav
    uid=112(clamav) gid=123(clamav) groups=123(clamav)

This is in the postinst:

  # Set up the clamav user on new install
  if [ -z "$2" ]; then
    if ! id clamav; then
        adduser --system --no-create-home --quiet \
            --disabled-password --disabled-login \
            --shell /bin/false --group --home /var/lib/clamav clamav
    fi

That check is probably the source of the warning. For example:

    triage-focal+20.04:~$ if ! id foobar; then echo "foobar needs created"; fi
    id: ‘foobar’: no such user
    foobar needs created

So, I think the message does not actually indicate a "real" problem, it's just a stray warning from the test that should have been ignored, like:

    if ! id clamav 2>/dev/null; then