From the Ubuntu documentation, try installing usbmount
.
sudo apt-get install usbmount
Here is the description from the repo:
automatically mount and unmount USB mass storage devices This package
automatically mounts USB mass storage devices (typically USB pens)
when they are plugged in, and unmounts them when they are removed.
The mountpoints (/media/usb[0-7] by default), filesystem types to
consider, and mount options are configurable. When multiple devices
are plugged in, the first available mountpoint is automatically
selected. If the device provides a model name, a symbolic link
/var/run/usbmount/MODELNAME pointing to the mountpoint is
automatically created.
When using automount, it will mount the storage devices at /media/usb[0-7]
(there is no dialog).
Printers/scanners are not "mounted" and would be configured differently. Although, if your end goal is to just pass these along to your Windows guest, you need to install the VirtualBox Extension Pack, from here https://www.virtualbox.org/wiki/Downloads. The devices to not need to be set up within your Ubuntu host prior to using them with your Windows guest.