Skip to content

File Management

Mounting Drives

fstab

The fstab (/etc/fstab) (or file systems table) file is a system configuration file on Debian systems. The fstab file typically lists all available disks and disk partitions, and indicates how they are to be initialized or otherwise integrated into the overall system's file system.

Samba Share1

Debian

sudo apt update && sudo apt install -y samba
sudo nano /etc/samba/smb.conf
Example SMB config entry
[appdaemon]
path = /root/appdaemon
browseable = yes
read only = no
writable = yes
guest ok = yes
Create user for SMB
sudo useradd --groups sambashare smb
Set passwords
passwd smb
smbpasswd -a smb
Restart the services
systemctl restart smbd && systemctl restart smbd

Home Assistant2

Home Assistant configuration files can be shared in the config folder share.

Example /etc/fstab entry
//homeassistant/config /home/docker/homeassistant cifs uid=1000,gid=1000,forceuid,forcegid,vers=3.0,credentials=/mnt/.smbcredentials

Synology3

CIFS Version

Synology only supports version 2.0

Example /etc/fstab entry
//JOHN-NAS/home/smarthome/homeassistant /home/docker/homeassistant_old cifs uid=1000,gid=1000,forceuid,forcegid,vers=2.0,credentials=/mnt/.nascredentials

  1. CIFS vs SAMBA, What are the differences

    SAMBA was originally SMB Server – but the name had to be changed due to SMB Server being an actual product. SMB was the predecessor to CIFS. SMB (Server Message Block) and CIFS (Common Internet File System) are protocols. Samba implements CIFS network protocol. This is what allows Samba to communicate with (newer) MS Windows systems. Typically you will see it referred to as SMB/CIFS. However, CIFS is the extension of the SMB protocol, so if someone is sharing out SMB via Samba to a legacy system still using NetBIOS, it will typically connect to the Samba server via ports 137, 138 and 139 and CIFS is strictly port 445.

    So to answer your question directly, Samba provides CIFS file shares. The time when you might use SMB over CIFS is if you are providing access to a Windows 2000 systems or earlier or you just want to connect to port 139 instead of 445.

    If you truly want to know about CIFS one of the definitive books is available free online.

    Implementing CIFS - The Common Internet Filesystem

    If you want to get deeper into Samba this book is available online free as well.

    Using Samba 2nd Edition

    Though there is a newer edition out but not free online that I am aware of. 

  2. Samba share 

  3. SMB Settings