Install Samba and mount network disk

Install Samba and cifs-utils

sudo apt update && sudo apt -y install samba && sudo apt install -y cifs-utils

Add disk to Samba configuration

sudo vim /etc/samba/smb.conf

Add:

[videos]
    path = /videos
    browsable = yes
    read only = no

Restart Samba

sudo service smbd restart

Create Samba credentials (smbcredentials)

vim ~/.smbcredentials

Add:

username=christopher
password=password
domain=WORKGROUP

Set permissions for smbcredentials

chmod 0600 ~/.smbcredentials

Set Samba password for user

sudo smbpasswd -a christopher

Get host device IP address

hostname -I

Add disk into another devices

sudo mkdir /videos && sudo vim /etc/fstab # In another device

Add:

# Where "192.168.0.6" is the host device with the shared disk
//192.168.0.6/videos /videos/ cifs credentials=/home/christopher/.smbcredentials,uid=christopher 0 0

Check mount

sudo mount -a

Leave a Comment

Scroll to Top