[Touch-packages] [Bug 1890520] Re: catastrophic bug with deluser command -- destroys large number of system files

2020-08-07 Thread Bill Yikes
Notice also there is a serious transparency problem.  The output only
shows files for which removal failed.  This acutely heightens the
destruction because it potentially destroyed *thousands* of files as I
sat there and let it run.  The tool gives no idea how what's being
destroyed.  The admin has to trust that their understanding of the scope
of removal is accurate.  In the absence of errors, an admin would let it
run through to the end, resulting in maximum damage.

This tool badly needs a --simulate option.  And regardless of
simulation, it should show what files are affected.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to adduser in Ubuntu.
https://bugs.launchpad.net/bugs/1890520

Title:
  catastrophic bug with deluser command -- destroys large number of
  system files

Status in adduser package in Ubuntu:
  New

Bug description:
  I installed rygel and created a specific rygel user to run it with (as
  directed by the docs). I then realized a specific user was not needed.
  To reverse my steps, I ran deluser which proceeded to delete lots of
  files that have nothing to do with the rygel user:

  root@host:~# adduser --home /home/rygel --disabled-password --disabled-login 
--gecos 'Rygel media server' rygel
  root@host:~# sudo su - rygel
  rygel@host:$ systemctl start rygel
  rygel@host:$ exit
  root@host:~# deluser --remove-home --remove-all-files rygel
  Looking for files to backup/remove ...
  /usr/sbin/deluser: Cannot handle special file /etc/systemd/system/mdm.service
  /usr/sbin/deluser: Cannot handle special file 
/etc/systemd/system/samba-ad-dc.service
  /usr/sbin/deluser: Cannot handle special file 
/etc/systemd/system/cgmanager.service
  /usr/sbin/deluser: Cannot handle special file 
/etc/systemd/system/cgproxy.service
  /usr/sbin/deluser: Cannot handle special file /dev/vcsa7
  /usr/sbin/deluser: Cannot handle special file /dev/vcsu7
  /usr/sbin/deluser: Cannot handle special file /dev/vcs7
  /usr/sbin/deluser: Cannot handle special file /dev/gpiochip0
  /usr/sbin/deluser: Cannot handle special file /dev/dvdrw
  /usr/sbin/deluser: Cannot handle special file /dev/dvd
  /usr/sbin/deluser: Cannot handle special file /dev/cdrw
  /usr/sbin/deluser: Cannot handle special file /dev/zfs
  /usr/sbin/deluser: Cannot handle special file /dev/vhost-vsock
  /usr/sbin/deluser: Cannot handle special file /dev/vhost-net
  /usr/sbin/deluser: Cannot handle special file /dev/uhid
  /usr/sbin/deluser: Cannot handle special file /dev/vhci
  /usr/sbin/deluser: Cannot handle special file /dev/userio
  /usr/sbin/deluser: Cannot handle special file /dev/nvram
  /usr/sbin/deluser: Cannot handle special file /dev/btrfs-control
  /usr/sbin/deluser: Cannot handle special file /dev/cuse
  /usr/sbin/deluser: Cannot handle special file /dev/autofs
  /usr/sbin/deluser: Cannot handle special file /dev/sde
  /usr/sbin/deluser: Cannot handle special file /dev/sdd
  /usr/sbin/deluser: Cannot handle special file /dev/sdc
  /usr/sbin/deluser: Cannot handle special file /dev/sdb
  /usr/sbin/deluser: Cannot handle special file /dev/sg5
  /usr/sbin/deluser: Cannot handle special file /dev/sg4
  /usr/sbin/deluser: Cannot handle special file /dev/sg3
  /usr/sbin/deluser: Cannot handle special file /dev/sg2
  /usr/sbin/deluser: Cannot handle special file /dev/vcsa6
  /usr/sbin/deluser: Cannot handle special file /dev/vcsu6
  /usr/sbin/deluser: Cannot handle special file /dev/vcs6
  /usr/sbin/deluser: Cannot handle special file /dev/vcsa5
  /usr/sbin/deluser: Cannot handle special file /dev/vcsu5
  /usr/sbin/deluser: Cannot handle special file /dev/vcs5
  /usr/sbin/deluser: Cannot handle special file /dev/vcsa4
  /usr/sbin/deluser: Cannot handle special file /dev/vcsu4
  /usr/sbin/deluser: Cannot handle special file /dev/vcs4
  /usr/sbin/deluser: Cannot handle special file /dev/vcsa3
  /usr/sbin/deluser: Cannot handle special file /dev/vcsu3
  /usr/sbin/deluser: Cannot handle special file /dev/vcs3
  /usr/sbin/deluser: Cannot handle special file /dev/vcsa2
  /usr/sbin/deluser: Cannot handle special file /dev/vcsu2
  /usr/sbin/deluser: Cannot handle special file /dev/vcs2
  /usr/sbin/deluser: Cannot handle special file /dev/hidraw2
  /usr/sbin/deluser: Cannot handle special file /dev/hidraw1
  /usr/sbin/deluser: Cannot handle special file /dev/cdrom
  /usr/sbin/deluser: Cannot handle special file /dev/hidraw0
  /usr/sbin/deluser: Cannot handle special file /dev/fb0
  /usr/sbin/deluser: Cannot handle special file /dev/i2c-5
  /usr/sbin/deluser: Cannot handle special file /dev/i2c-4
  /usr/sbin/deluser: Cannot handle special file /dev/i2c-3
  /usr/sbin/deluser: Cannot handle special file /dev/i2c-2
  /usr/sbin/deluser: Cannot handle special file /dev/i2c-1
  /usr/sbin/deluser: Cannot handle special file /dev/i2c-0
  /usr/sbin/deluser: Cannot handle special file /dev/rtc
  /usr/sbin/deluser: Cannot handle special file /dev/stderr
  /usr/sbin/deluser: Cannot handle 

[Touch-packages] [Bug 1890520] Re: catastrophic bug with deluser command -- destroys large number of system files

2020-08-06 Thread Kai Kasurinen
** Package changed: ubuntu => adduser (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to adduser in Ubuntu.
https://bugs.launchpad.net/bugs/1890520

Title:
  catastrophic bug with deluser command -- destroys large number of
  system files

Status in adduser package in Ubuntu:
  New

Bug description:
  I installed rygel and created a specific rygel user to run it with (as
  directed by the docs). I then realized a specific user was not needed.
  To reverse my steps, I ran deluser which proceeded to delete lots of
  files that have nothing to do with the rygel user:

  root@host:~# adduser --home /home/rygel --disabled-password --disabled-login 
--gecos 'Rygel media server' rygel
  root@host:~# sudo su - rygel
  rygel@host:$ systemctl start rygel
  rygel@host:$ exit
  root@host:~# deluser --remove-home --remove-all-files rygel
  Looking for files to backup/remove ...
  /usr/sbin/deluser: Cannot handle special file /etc/systemd/system/mdm.service
  /usr/sbin/deluser: Cannot handle special file 
/etc/systemd/system/samba-ad-dc.service
  /usr/sbin/deluser: Cannot handle special file 
/etc/systemd/system/cgmanager.service
  /usr/sbin/deluser: Cannot handle special file 
/etc/systemd/system/cgproxy.service
  /usr/sbin/deluser: Cannot handle special file /dev/vcsa7
  /usr/sbin/deluser: Cannot handle special file /dev/vcsu7
  /usr/sbin/deluser: Cannot handle special file /dev/vcs7
  /usr/sbin/deluser: Cannot handle special file /dev/gpiochip0
  /usr/sbin/deluser: Cannot handle special file /dev/dvdrw
  /usr/sbin/deluser: Cannot handle special file /dev/dvd
  /usr/sbin/deluser: Cannot handle special file /dev/cdrw
  /usr/sbin/deluser: Cannot handle special file /dev/zfs
  /usr/sbin/deluser: Cannot handle special file /dev/vhost-vsock
  /usr/sbin/deluser: Cannot handle special file /dev/vhost-net
  /usr/sbin/deluser: Cannot handle special file /dev/uhid
  /usr/sbin/deluser: Cannot handle special file /dev/vhci
  /usr/sbin/deluser: Cannot handle special file /dev/userio
  /usr/sbin/deluser: Cannot handle special file /dev/nvram
  /usr/sbin/deluser: Cannot handle special file /dev/btrfs-control
  /usr/sbin/deluser: Cannot handle special file /dev/cuse
  /usr/sbin/deluser: Cannot handle special file /dev/autofs
  /usr/sbin/deluser: Cannot handle special file /dev/sde
  /usr/sbin/deluser: Cannot handle special file /dev/sdd
  /usr/sbin/deluser: Cannot handle special file /dev/sdc
  /usr/sbin/deluser: Cannot handle special file /dev/sdb
  /usr/sbin/deluser: Cannot handle special file /dev/sg5
  /usr/sbin/deluser: Cannot handle special file /dev/sg4
  /usr/sbin/deluser: Cannot handle special file /dev/sg3
  /usr/sbin/deluser: Cannot handle special file /dev/sg2
  /usr/sbin/deluser: Cannot handle special file /dev/vcsa6
  /usr/sbin/deluser: Cannot handle special file /dev/vcsu6
  /usr/sbin/deluser: Cannot handle special file /dev/vcs6
  /usr/sbin/deluser: Cannot handle special file /dev/vcsa5
  /usr/sbin/deluser: Cannot handle special file /dev/vcsu5
  /usr/sbin/deluser: Cannot handle special file /dev/vcs5
  /usr/sbin/deluser: Cannot handle special file /dev/vcsa4
  /usr/sbin/deluser: Cannot handle special file /dev/vcsu4
  /usr/sbin/deluser: Cannot handle special file /dev/vcs4
  /usr/sbin/deluser: Cannot handle special file /dev/vcsa3
  /usr/sbin/deluser: Cannot handle special file /dev/vcsu3
  /usr/sbin/deluser: Cannot handle special file /dev/vcs3
  /usr/sbin/deluser: Cannot handle special file /dev/vcsa2
  /usr/sbin/deluser: Cannot handle special file /dev/vcsu2
  /usr/sbin/deluser: Cannot handle special file /dev/vcs2
  /usr/sbin/deluser: Cannot handle special file /dev/hidraw2
  /usr/sbin/deluser: Cannot handle special file /dev/hidraw1
  /usr/sbin/deluser: Cannot handle special file /dev/cdrom
  /usr/sbin/deluser: Cannot handle special file /dev/hidraw0
  /usr/sbin/deluser: Cannot handle special file /dev/fb0
  /usr/sbin/deluser: Cannot handle special file /dev/i2c-5
  /usr/sbin/deluser: Cannot handle special file /dev/i2c-4
  /usr/sbin/deluser: Cannot handle special file /dev/i2c-3
  /usr/sbin/deluser: Cannot handle special file /dev/i2c-2
  /usr/sbin/deluser: Cannot handle special file /dev/i2c-1
  /usr/sbin/deluser: Cannot handle special file /dev/i2c-0
  /usr/sbin/deluser: Cannot handle special file /dev/rtc
  /usr/sbin/deluser: Cannot handle special file /dev/stderr
  /usr/sbin/deluser: Cannot handle special file /dev/stdout
  /usr/sbin/deluser: Cannot handle special file /dev/stdin
  /usr/sbin/deluser: Cannot handle special file /dev/sda6
  /usr/sbin/deluser: Cannot handle special file /dev/sda5
  /usr/sbin/deluser: Cannot handle special file /dev/sda3
  /usr/sbin/deluser: Cannot handle special file /dev/sda2
  /usr/sbin/deluser: Cannot handle special file /dev/sda1
  /usr/sbin/deluser: Cannot handle special file /dev/sg1
  /usr/sbin/deluser: Cannot handle special file /dev/sr0
  /usr/sbin/deluser: Cannot handle special file