Bug#327804: Same problem with hal

Peter Eisentraut
2005-09-14T14:48:44Z

I was going to report this as a separate bug but it seems to have the same
symptoms, so I''ll add it here.

The context is that the package "hal" cannot be installed anymore
because
adduser misbehaves.  I extracted the relevant command from the postinst
and ran it by hand several times in a row.  Behold:

bell:~# getent passwd hal
bell:~# getent group hal
bell:~# adduser --quiet --system --home /var/run/hal --gecos "Hardware
abstraction layer" --group hal
useradd: unknown group hal
adduser: `/usr/sbin/useradd -d /var/run/hal -g hal -s /bin/false -u 108
hal'' returned error code 6.  Aborting.
Cleaning up.
Removing user `hal''.
userdel: user hal does not exist
Removing group `hal''.
groupdel: group hal does not exist
bell:~# getent passwd hal
bell:~# getent group hal
hal:x:108:
bell:~# adduser --quiet --system --home /var/run/hal --gecos "Hardware
abstraction layer" --group hal
chfn: Unknown user hal
adduser: `/usr/bin/chfn -f Hardware abstraction layer hal'' returned
error code 1.  Aborting.
Cleaning up.
Removing user `hal''.
userdel: user hal does not exist
bell:~# getent passwd hal
bell:~# getent group hal
hal:x:108:
bell:~# adduser --quiet --system --home /var/run/hal --gecos "Hardware
abstraction layer" --group hal
useradd: user hal exists
adduser: `/usr/sbin/useradd -d /var/run/hal -g hal -s /bin/false -u 114
hal'' returned error code 9.  Aborting.
Cleaning up.
Removing user `hal''.
bell:~# getent passwd hal
hal:x:112:108::/var/run/hal:/bin/false
bell:~# getent group hal
bell:~# adduser --quiet --system --home /var/run/hal --gecos "Hardware
abstraction layer" --group hal
useradd: unknown group hal
adduser: `/usr/sbin/useradd -d /var/run/hal -g hal -s /bin/false -u 108
hal'' returned error code 6.  Aborting.
Cleaning up.
Removing user `hal''.
userdel: user hal does not exist
Removing group `hal''.
groupdel: group hal does not exist
bell:~# getent passwd hal
bell:~# getent group hal
hal:x:108:

So as you see, it doesn''t even behave deterministically.