I have udev rules that creates a directory for each usb-media that is plugged into my debian to automount usb-media. This directory where mount-points (the mount-directories) are created is passed through a rdp-connection with rdesktop. On our terminalserver there's a drive Z that shows all mount-points with content of usb-media.
When users remove usb-media, udev unmounts usb-media and tries to delete the directory that was used to mount usb-media. If the users hasn't closed explorer showing any subfolder of usb-media, the unmount-command succeeds but the rmdir-command fails because the ressource is "busy or used".
My question: how can I force to delete this mountpoint? (rmdir doesn't have force and rm -rf doesn't work)
Edit: I should add, that I can't use third-party software or additional packages because the linux-machine is a thin-client with very low disk-space.