8

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.

3

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.

| improve this answer | |
  • A got it these are of course file descriptors. OK I hope you are right. Is there anything I can check after getting this kind of messages due to deleting a user? – Mike May 24 '15 at 21:33
  • From reading the code, that message is classified as a warning. Its purpose is to inform that some links to block or character devices were not removed by the command. Administrator is supposed to deal with them manually. (in this particular case the fd files are links to the /dev/null character device) Can't see a big deal here. – Velkan May 25 '15 at 12:50
  • OK ;) too bad I do not have the other warnings anymore ;) – Mike May 25 '15 at 17:22
5

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.