id: ‘clamav’: no such user

Bug #1920217 reported by Wileam Yonatan Phan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
clamav (Debian)
New
Unknown
clamav (Ubuntu)
Fix Released
Low
Bryce Harrington

Bug Description

On a fresh install of ClamAV using
$ sudo apt install clamav
the terminal output shows the following error message:

Setting up clamav-base (0.102.4+dfsg-0ubuntu0.20.04.1) ...
id: ‘clamav’: no such user

which I think suggests something doesn't work in the postinst script.

I'm on Ubuntu 20.04.2 LTS x86_64, and this happened with clamav-base version 0.102.4+dfsg-0ubuntu0.20.04.1

Related branches

tags: added: clamav
tags: added: focal
Revision history for this message
Chris Guiver (guiverc) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command only once, as it will automatically gather debugging information, in a terminal:

apport-collect 1920217

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

For support you can use the answer section of launchpad, ie. https://answers.launchpad.net/ubuntu. You can also find help with your problem in the support forum of your local Ubuntu community http://loco.ubuntu.com/ or asking at https://askubuntu.com or https://ubuntuforums.org, or for more support options please look at https://discourse.ubuntu.com/t/community-support/709

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

Changed in clamav (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Bryce Harrington (bryce)
Changed in clamav (Ubuntu):
assignee: nobody → Bryce Harrington (bryce)
Bryce Harrington (bryce)
Changed in clamav (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Wileam Yonatan Phan (wileamyp) wrote :

Thanks for working on this! Looking forward for this simple fix to be merged.

tags: added: bitesize
Bryce Harrington (bryce)
Changed in clamav (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package clamav - 0.103.6+dfsg-1ubuntu1

---------------
clamav (0.103.6+dfsg-1ubuntu1) kinetic; urgency=medium

  * clamav-base.postinst.in: Quell warning from check for clamav user
    (LP: #1920217)

 -- Bryce Harrington <email address hidden> Wed, 18 May 2022 17:26:41 -0700

Changed in clamav (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Wileam Yonatan Phan (wileamyp) wrote (last edit ):

Thanks for fixing this! Any plans to backport this to focal or jammy?

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

@Wileam, since it's in essence a cosmetic issue, I haven't made any plans myself to backport it. The fix itself is pretty straightforward, however I think to get a backport approved by the SRU team, a case would need to be made regarding it having a severe impact on users.

Revision history for this message
Wileam Yonatan Phan (wileamyp) wrote :

I see. Hopefully when others search this particular error message on their favorite search engine, they would be relieved to know that it's safe to ignore it. Thanks again!

Changed in clamav (Debian):
status: Unknown → New
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.