Purpose
Configure Samba server with external hard disk in Linux machine permanently.
I have 2 usb hardisk in a one rapberrypi with samba server and ubuntu operating system. I want share this hard disk in my network permanently
Steps
[FIRST PART] - Mount disk permanently
COMMAND: sudo fdisk -l
List all disk
COMMAND: mkdir
We need to create 2 folders to mount each external disk, one for each disk
COMMAND: chmod
We need apply security folder permissions
COMMAND: blkid
Verify the unique identifier of disk.
In order mantain this share configuration at the next boot, we need modify the fstab file
COMMAND: sudo cp /etc/fstab /etc/fstab.old
Backup file configutartion
COMMAND: sudo nano /etc/fstab
Dismount and mount discks
COMMAND: ls
Check the mount disk
COMMAND: sudo reboot
Now, you can reboot the computer to verify if it is permanent this configuration
[SECOND PART] Share disk in Network
Share this folders to network
REF: https://gonsystem.blogspot.com/2020/09/linux-samba-server-ubuntu.html
COMMAND: sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.old2
Backup file configutartion
COMMAND: sudo nano /etc/samba/smb.conf
Modify the configuration file, add next text
COMMAND: testparm
Check parameters
COMMAND: sudo systemctl restart smbd COMMAND: sudo service smbd restart Restart samba service
[PART THREE] Check at client