How to mount external HDD and share with samba?

  • Platform information:
    • Hardware: RPI4 4GB
    • OS: openhabian 3.0.2
    • Java Runtime Environment: which java platform is used and what version
    • openHAB version:
  • Issue of the topic: mount external storage and share with samba

Hi,

What I would do is,

Give your USB device a static name and share it as a normal HDD/folder
There are many examples on the internet

There will also be other solutions. but I use these for my z-wave and zigbee stick.
I don’t want to recommend something I’ve never used myself.

But I am not an expert on Linux

To give you a starting point:

Samba info pi os
sudo nano /etc/samba/smb.conf

add the line below to your conf file and fill in your own values

[sharename]
path = path to mount
available = yes
valid users = usename
read only = no
browseable = yes
public = yes
writable = yes

sudo systemctl restart smbd

Samba Add a User
useradd joe
passwd joe

smbpasswd -a joe

Did you search, since there are literally tons of articles on how to do that:

or step by step guide:

https://www.simonthepiman.com/how_to_setup_windows_file_server.php

1 Like