This bug needs to be re-opened, as the previous fix did not account for the --remove-all-files usage.
deluser --remove-all-files fails to remove the Examples symlink in the more recent version of adduser in Hardy, adduser 3.105ubuntu1. deluser --remove-home is OK. [EMAIL PROTECTED]:~# adduser worik Adding user `worik' ... Adding new group `worik' (1001) ... Adding new user `worik' (1001) with group `worik' ... Creating home directory `/home/worik' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for worik Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [y/N] y [EMAIL PROTECTED]:~# ls -la /home/worik total 20 drwxr-xr-x 2 worik worik 4096 2008-06-25 20:24 . drwxr-xr-x 5 root root 4096 2008-06-25 20:24 .. -rw-r--r-- 1 worik worik 220 2008-06-25 20:24 .bash_logout -rw-r--r-- 1 worik worik 2940 2008-06-25 20:24 .bashrc lrwxrwxrwx 1 worik worik 26 2008-06-25 20:24 Examples -> /usr/share/example-content -rw-r--r-- 1 worik worik 586 2008-06-25 20:24 .profile Now to delete the user :- [EMAIL PROTECTED]:~# deluser --remove-all-files worik Looking for files to backup/remove ... Removing files ... Removing user `worik' ... Warning: Removing group `worik', since no other user is part of it. Done. [EMAIL PROTECTED]:~# ls -la /home/worik total 8 drwxr-xr-x 2 1001 1001 4096 2008-06-25 20:26 . drwxr-xr-x 5 root root 4096 2008-06-25 20:24 .. lrwxrwxrwx 1 1001 1001 26 2008-06-25 20:24 Examples -> /usr/share/example-content The problem seems to be that deluser believes ~/Examples is a directory, and tries to rmdir() it unstead of unlink()ing. That implies that find_match() is having problems. home_match() assigns a filename to @files on both -f and -l filetest conditions, which means that the Examples symlink ends up in both @files and @dirs -- the dual categorisation is harmless, because by the time rmdir() is called, it has already been unlink()ed. But the different test structure of find_match() won't allow dual categorisation. Changing find_match() to test for -l before -d , and pushing -l results into @files, fixes the problem. I hope it doesn't introduce others, but that seems unlikely ... Patch attached. ** Attachment added: "Makes find_match assign "symlinks to directories" to @files, not @dirs" http://launchpadlibrarian.net/15576258/deluser.34299.patch -- deluser fails to remove home because of Examples link https://bugs.launchpad.net/bugs/34299 You received this bug notification because you are a member of Ubuntu Bugs, which is a direct subscriber. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs