Auto mount and share usb drive at same address

Hi,

I’m looking for a way to mount a usb flash drive always at the same “address” (regardless of which drive) and to share it with samba.
I think sharing with samba is not a problem…

But as each drive has got another ID they will be mounted automatically with /media/ which changes…
So my goal to connect always only 1 drive and to make it available at the same address and to share it.

I found that the package “usbmount” seems to do exactly this but it seems to be no longer maintained and I can’t install it as it seems not to work on debian stretch. Message: “Unable to locate package usbmount”.

Any ideas on how to do this? I searched already a lot but can’t find an easy solution.
If I’d need a reboot that wouldn’t be a problem.

Thanks,
Viktor

Well easiest way is to give every USB stick the same label as automount uses the label to define the mount point

Hi,

Thanks for your quick reply. Would that work with “new” sticks that were not connected yet?
Any hint how to do it?

Thanks,
Viktor

That would work with any USB stick as long as it has a label.
You can either set the label at time of formatting or later. The tool to be used depends on the filesystem used on the stick

Ok, wow. That seems to work and is a good solution for me :slight_smile:
Thank you!