Strange output when deleting user
I just added a new user to the system (Ubuntu 14.04 LTS server) using
adduser --force-badname myNewUser
After deleting it again with:
deluser --remove-all-files myNewUser
the system was fetching data from the disc (as expected) but it was fetching a long time (not expected) and finally it gives me a huge list of a strange output:
/usr/sbin/deluser: Cannot handle special file /proc/22220/fd/0
/usr/sbin/deluser: Cannot handle special file /proc/22220/fd/1
/usr/sbin/deluser: Cannot handle special file /proc/22220/fd/2
and so on.
After reading this answer I now know that the proc-directory is just a directory living in the memory. This just tells me that the files will be gone when rebooting my system. However it does not solve my issue.
Searching on google just shows up bug reports or a thread which states that deluser --remove-all-files is an old way deleting a user?
What does this output mean? Is my system now messed up? If so, how can I bring my system back on the right path.
Solution 1:
I know this question is very old but the behaviour still remains in Ubuntu 16.04
There is a bug report / feature request which sheds light on what is going on here
To summarise:
The deluser --remove-all-files USER
command scans for files owned by USER
and deletes them.
/usr/sbin/deluser: Cannot handle special file /proc/767/task/767/fd/2
...
/usr/sbin/deluser: Cannot handle special file /lib/systemd/system/halt.service
...
/usr/sbin/deluser: Cannot handle special file /dev/input/by-path/platform-i8042-serio-1-event-mouse
Are WARNINGS ONLY saying that the command can't handle this particular file because its a special file. IT HAS NOT TRIED TO DELETE THIS FILE It just can't run it's checks on it. ;-)
If you look back at the warnings you should find that they are all for file in /dev, /proc, /run or special system files like mountnfs.service which aren't normal files.
You should be able to safely ignore these warnings.
Solution 2:
Well, that user had some processes running.
22220 is probably a process ID, the fd/0, fd/1, fd/2 are stdin, stdout and stderr of that process. It is not a surprise that these can't be deleted. They go when the process goes.
I don't think that anything bad happened.