package clamav-base 0.97.3+dfsg-2.1ubuntu1 failed to install/upgrade: sub-processo script post-installation instalado retornou estado de saída de erro 1

Bug #1015414 reported by Ricardo Pires
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
clamav (Ubuntu)
Invalid
Medium
Scott Kitterman

Bug Description

the instalation stop after apt-get install clamav-freshclam

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: clamav-base 0.97.3+dfsg-2.1ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-25.40-generic-pae 3.2.18
Uname: Linux 3.2.0-25-generic-pae i686
ApportVersion: 2.0.1-0ubuntu8
Architecture: i386
Date: Wed Jun 20 03:32:05 2012
ErrorMessage: sub-processo script post-installation instalado retornou estado de saída de erro 1
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
PackageArchitecture: all
SourcePackage: clamav
Title: package clamav-base 0.97.3+dfsg-2.1ubuntu1 failed to install/upgrade: sub-processo script post-installation instalado retornou estado de saída de erro 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Ricardo Pires (ricardopires) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

DpkgTerminalLog.txt shows:
 Configurando samba4 (4.0.0~alpha18.dfsg1-4ubuntu2) ...
 Unknown parameter encountered: "max log size"
 Ignoring unknown parameter "max log size"
 ...
 Unknown parameter encountered: "guest ok"
 Ignoring unknown parameter "guest ok"
 /var/lib/dpkg/info/samba4.postinst: 14: /var/lib/dpkg/info/samba4.postinst: /usr/share/samba/setoption.pl: Permission denied
 dpkg: erro processando samba4 (--configure):
  sub-processo script post-installation instalado retornou estado de saída de erro 126
 Configurando libtommath0 (0.42.0-1) ...
 Configurando libclamav6 (0.97.3+dfsg-2.1ubuntu1) ...
 Configurando clamav-base (0.97.3+dfsg-2.1ubuntu1) ...
 adduser: O usuário 'clamav' já existe. Saindo.
 dpkg: erro processando clamav-base (--configure):

So, it appears that samba4 failed to configure, and then clamav did also.

Revision history for this message
Scott Moser (smoser) wrote :

reading clamav-base.postinst, it seems that on new install, it tries to add user.
It does not check if the user exists first.

So this is either expected failure, in order to avoid re-using an unexpected ID, or clamav should not create the user if it already exists.
http://www.debian.org/doc/manuals/securing-debian-howto/ch9.en.html#s-bpp-lower-privs has information on that.

Changed in clamav (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Scott Kitterman (kitterman) wrote :

I think it should not create the user if it already exists. I'll look at improving this in the next upload to Debian.

Changed in clamav (Ubuntu):
assignee: nobody → Scott Kitterman (kitterman)
Revision history for this message
Scott Kitterman (kitterman) wrote :

The triaging is not correct here. The problem is that on this system someone has manually created a clamav user as a non-system user. That (correctly) causes the postinst to fail because it can't correct the situation. The user needs to do so.

The call in the postinst is:

adduser --system --no-create-home --quiet --disabled-password --disabled-login --shell /bin/false --group --home /var/lib/clamav clamav

Because it has --quiet, if the clamav user exists as a system user there (correctly) won't be an error, but if it's a non-system user it (correctly) errors out.

The solution here is to delete the non-system clamav user and then reinstall ($ sudo userdel clamav).

Changed in clamav (Ubuntu):
status: Triaged → Invalid
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.