Public bug reported:

deluser --backup --remove-home (or --remove-all-files) USER
aborts if it encounters certain file names, for example the ubiquitous
'C:\nppdf32Log\debuglog.txt' left in Linux home directories by Firefox.

The root cause is that 'tar' helpfully "interprets escape sequences" in
its filename arguments, so file names containing a backslash followed by
'n' are changed to contain a newline character, and other similar cases.

The tar --no-unquote option prevents this.   So 'deluser' should pass
--no-unquote to 'tar' when creating the backup archive.

I'll attach a demo/regression-test script, but in brief:

STEPS TO REPRODUCE:

1. touch '/home/testuser/C:\nppdf32Log\debuglog.txt'
2. deluser --backup --remove-home testuser

RESULTS:

/bin/tar: /home/.../C\:\nppdf32Log\\debuglog.txt: Cannot stat: No such file or 
directory
(deluser aborts without doing anything except creating an empty archive file)

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: adduser 3.113+nmu3ubuntu5
ProcVersionSignature: Ubuntu 4.13.0-19.22-generic 4.13.13
Uname: Linux 4.13.0-19-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sun Dec 17 15:20:16 2017
InstallationDate: Installed on 2017-12-13 (4 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64 (20171018)
PackageArchitecture: all
SourcePackage: adduser
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: adduser (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug artful

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1738673

Title:
  deluser --backup fails because tar --no-unquote option should be used

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/adduser/+bug/1738673/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to