9

In Ubuntu 12.04 Desktop, USB devices can be plugged in, and they just work for the most part.

In Ubuntu 12.04 Server, when I plug in a USB device it does nothing.

How can I setup server do act like desktop when it comes to adding USB devices such as printers, scanners, and thumb-drives?

Ultimately I will be forwarding this USB devices to a VirtualBox virtual machine. However, if Ubuntu server doesn't mount them in some way, I can't get VirtuaBox to see them either.

LonnieBest
  • 1,450
  • 4
  • 21
  • 36

2 Answers2

7

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.

reverendj1
  • 354
  • 1
  • 6
  • And this will work for non-storage-type-devices as well (such as a printer or scanner)? – LonnieBest Aug 03 '12 at 20:37
  • I've got this installed, but it isn't doing anything. I have ubuntu-desktop installed on Ubuntu server. When I put in USB, nothing happens, no prompts. – LonnieBest Aug 03 '12 at 20:47
  • I went ahead and installed Ubuntu Desktop OS. I couldn't get Server to act like Ubuntu Desktop with sudo apt-get install ubuntu-desktop . . . It just wouldn't pop up a notification when usb drive was added. I realize it may have been mounting stuff automatically, but I wanted the gui acknowledgements too. – LonnieBest Aug 04 '12 at 04:29
  • 2
    If you use usbmount, keep in mind that by default it only handles vfat, ext2, ext3, ext4, and hfsplus filesystems. If your disk is ntfs, add it to FILESYSTEMS directive in /etc/usbmount/usbmount.conf – Moonchild Nov 11 '13 at 16:16
7
  1. Install usbmount

    sudo apt-get install usbmount
    
  2. Allow users to access usb drives

    sudo sed -i 's/MOUNTOPTIONS="/MOUNTOPTIONS="user,umask=000,/' /etc/usbmount/usbmount.conf
    
  3. Plug in and use

    cd /media/usb
    touch beeblebrox
    

You can get some More Details.

cmc
  • 637
  • 6
  • 7
  • It's need to add **-i** in order to save the changes in file and make to only change the first match of _MOUNTOPTIONS_: `sudo sed -in '0,/MOUNTOPTIONS="/s/MOUNTOPTIONS="/MOUNTOPTIONS="user,umask=000,/' /etc/usbmount/usbmount.conf` – Maxwel Leite Dec 16 '14 at 15:43
  • 2
    Yes, thank you @MaxwelLeite. Note you can do edits yourself, and you will receive 2 points if it is accepted. – cmc Dec 16 '14 at 16:57
  • what is beeblebrox? – eri0o Apr 21 '16 at 19:03