Bug#458015: invalid group error in postinst
On Mon, Jan 07, 2008 at 11:42:43PM +, Stephen Gran wrote: clamav-base. It does a fairly standard: if [ -z $2 ]; then if [ -z `getent passwd clamav` ]; then adduser --system --no-create-home \ --disabled-password --disabled-login \ --shell /bin/false --group --home /var/lib/clamav clamav fi chown clamav:clamav $DATABASEDIR chown clamav:clamav $RUNDIR chown clamav:clamav $LOGDIR This can go wrong if you've removed the package but not purged it and then delgroup'ed the group (if you purge the package, it removes both user and group), or if even on a fresh install there is a user but no group present. Both of those are so strange I didn't (and don't) consider them hugely interesting cases to code around. I just don't know how you've gotten that error. The only thing I can think of is that you may have scripts for copying in accounts into the chroot that fails to also copy in the groups? I can't be sure of this, but what I _might_ have done is copying /etc/passwd and/or /etc/group from outside the chroot (to propagate UIDs/GIDs). Perhaps I only copied /etc/passwd (which presumably would include 'clamav') and not /etc/group ? That would explain it. In that case, I'd suggest making it more robust. Something like: if [ -z `getent group clamav` ]; then addgroup clamav fi if [ -z `getent passwd clamav` ]; then adduser --system --no-create-home \ --disabled-password --disabled-login \ --shell /bin/false --home /var/lib/clamav clamav \ --ingroup clamav fi -- Robert Millan GPLv2 I know my rights; I want my phone call! DRM What use is a phone call, if you are unable to speak? (as seen on /.) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#458015: invalid group error in postinst
severity 458015 normal retitle 458015 clamav-base: Could be more robust when group has been removed thanks This one time, at band camp, Robert Millan said: On Mon, Jan 07, 2008 at 11:42:43PM +, Stephen Gran wrote: This can go wrong if you've removed the package but not purged it and then delgroup'ed the group (if you purge the package, it removes both user and group), or if even on a fresh install there is a user but no group present. Both of those are so strange I didn't (and don't) consider them hugely interesting cases to code around. I just don't know how you've gotten that error. The only thing I can think of is that you may have scripts for copying in accounts into the chroot that fails to also copy in the groups? I can't be sure of this, but what I _might_ have done is copying /etc/passwd and/or /etc/group from outside the chroot (to propagate UIDs/GIDs). Perhaps I only copied /etc/passwd (which presumably would include 'clamav') and not /etc/group ? That would explain it. In that case, I'd suggest making it more robust. Something like: OK. To be honest, I am not inclined to think of this as a bug in clamav at this point, but a bug in the environment. The changes are simple, so I'll probably apply them, but they're certainly not RC. Cheers, -- - | ,''`.Stephen Gran | | : :' :[EMAIL PROTECTED] | | `. `'Debian user, admin, and developer | |`- http://www.debian.org | - signature.asc Description: Digital signature
Bug#458015: invalid group error in postinst
On Tue, Jan 08, 2008 at 11:51:54AM +, Stephen Gran wrote: severity 458015 normal retitle 458015 clamav-base: Could be more robust when group has been removed thanks This one time, at band camp, Robert Millan said: On Mon, Jan 07, 2008 at 11:42:43PM +, Stephen Gran wrote: This can go wrong if you've removed the package but not purged it and then delgroup'ed the group (if you purge the package, it removes both user and group), or if even on a fresh install there is a user but no group present. Both of those are so strange I didn't (and don't) consider them hugely interesting cases to code around. I just don't know how you've gotten that error. The only thing I can think of is that you may have scripts for copying in accounts into the chroot that fails to also copy in the groups? I can't be sure of this, but what I _might_ have done is copying /etc/passwd and/or /etc/group from outside the chroot (to propagate UIDs/GIDs). Perhaps I only copied /etc/passwd (which presumably would include 'clamav') and not /etc/group ? That would explain it. In that case, I'd suggest making it more robust. Something like: OK. To be honest, I am not inclined to think of this as a bug in clamav at this point, but a bug in the environment. The changes are simple, so I'll probably apply them, but they're certainly not RC. Ok, thanks. -- Robert Millan GPLv2 I know my rights; I want my phone call! DRM What use is a phone call, if you are unable to speak? (as seen on /.) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#458015: invalid group error in postinst
This one time, at band camp, Robert Millan said: postinst seems to assume that clamav group already exists: [...] S'està configurant clamav-base (0.92~dfsg-2) ... chown: «clamav:clamav»: el grup no és vàlid dpkg: s'ha produït un error en processar clamav-base (--configure): el subprocés post-installation script retornà el codi d'eixida d'error 1 Sorry about taking so long to get back to you - I was on vacation. Whatis the output of `id clamav` on the affected system? It appears that you have the user but not the group, which is a should not happen kind of situation. -- - | ,''`.Stephen Gran | | : :' :[EMAIL PROTECTED] | | `. `'Debian user, admin, and developer | |`- http://www.debian.org | - signature.asc Description: Digital signature
Bug#458015: invalid group error in postinst
On Mon, Jan 07, 2008 at 11:24:01PM +, Stephen Gran wrote: This one time, at band camp, Robert Millan said: postinst seems to assume that clamav group already exists: [...] S'està configurant clamav-base (0.92~dfsg-2) ... chown: «clamav:clamav»: el grup no és vàlid dpkg: s'ha produït un error en processar clamav-base (--configure): el subprocés post-installation script retornà el codi d'eixida d'error 1 Sorry about taking so long to get back to you - I was on vacation. No problem. Whatis the output of `id clamav` on the affected system? It appears that you have the user but not the group, which is a should not happen kind of situation. At this time I have neither the user nor the group, but when this error happened I had only the user. I'm afraid I can't explain why. All I know is: - This was a long-standing sid chroot. - It never had clamav installed before (that I can recall). - I did sudo apt-get install clamav, which produced this error. Which package is responsible for adding the group? -- Robert Millan GPLv2 I know my rights; I want my phone call! DRM What use is a phone call, if you are unable to speak? (as seen on /.) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#458015: invalid group error in postinst
This one time, at band camp, Robert Millan said: On Mon, Jan 07, 2008 at 11:24:01PM +, Stephen Gran wrote: Whatis the output of `id clamav` on the affected system? It appears that you have the user but not the group, which is a should not happen kind of situation. At this time I have neither the user nor the group, but when this error happened I had only the user. I'm afraid I can't explain why. All I know is: - This was a long-standing sid chroot. - It never had clamav installed before (that I can recall). - I did sudo apt-get install clamav, which produced this error. Which package is responsible for adding the group? clamav-base. It does a fairly standard: if [ -z $2 ]; then if [ -z `getent passwd clamav` ]; then adduser --system --no-create-home \ --disabled-password --disabled-login \ --shell /bin/false --group --home /var/lib/clamav clamav fi chown clamav:clamav $DATABASEDIR chown clamav:clamav $RUNDIR chown clamav:clamav $LOGDIR This can go wrong if you've removed the package but not purged it and then delgroup'ed the group (if you purge the package, it removes both user and group), or if even on a fresh install there is a user but no group present. Both of those are so strange I didn't (and don't) consider them hugely interesting cases to code around. I just don't know how you've gotten that error. The only thing I can think of is that you may have scripts for copying in accounts into the chroot that fails to also copy in the groups? -- - | ,''`.Stephen Gran | | : :' :[EMAIL PROTECTED] | | `. `'Debian user, admin, and developer | |`- http://www.debian.org | - signature.asc Description: Digital signature
Bug#458015: invalid group error in postinst
Package: clamav-base Version: 0.92~dfsg-2 Severity: grave postinst seems to assume that clamav group already exists: [...] S'està configurant clamav-base (0.92~dfsg-2) ... chown: «clamav:clamav»: el grup no és vàlid dpkg: s'ha produït un error en processar clamav-base (--configure): el subprocés post-installation script retornà el codi d'eixida d'error 1 -- System Information: Debian Release: lenny/sid APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-5-amd64 Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]