Ask Your Question
0

How do I automount all usb drives, so they are accessible to all users?

asked 2015-10-06 07:56:52 -0600

dcrdev gravatar image

Currently my system automounts usb drives under the logged in user - I believe it's XFCE that's doing this as oppose to a system wide rule. This means that anything that gets mounted does so under /media/$user/$label. I would like all inserted usb drives to mount under /media/$label and then be accessible by all users on the system.

Additionally I want this to happen outside of the desktop environment so that I can insert a random device, ssh in and be able to access the pre mounted device.

How can I accomplish this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-10-07 01:22:22 -0600

Tiger gravatar image

hey change in the /etc/fstab file.....

<device> <mountpoint> <filesystemtype><options> <dump> <fsckorder>

  /dev/hdb5         /                       ext2               defaults       1              1
  /dev/hdb2        /home                  ext2               defaults       1             2
 /dev/hdc         /mnt/cdrom            iso9660         noauto,ro,user     0        0
/dev/hda1     /mnt/dos/c              msdos              defaults        0             0
/dev/hdb1    /mnt/dos/d              msdos            defaults           0             0
/dev/fd0     /mnt/floppy               ext2               noauto,user     0             0
/dev/hdb4     none                     ignore             defaults          0              0

none            /proc                       proc                defaults
/dev/hdb3    none                        swap                sw


here 4th one field is the user name :)

edit flag offensive delete link more

Comments

That'll only work with a fixed number of drives - udev rules allow you to specify wildcards and have the drives mount under their retrospective label in /media.

dcrdev gravatar imagedcrdev ( 2015-10-07 02:40:00 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2015-10-06 07:56:52 -0600

Seen: 383 times

Last updated: Oct 07 '15