Share HDD in network

Hello.
I recently installed Zorin 18.2 on my obsolete Win10 PC. I did the installation on the SSD, and it works perfectly.

I also have a build-in HDD wich contains all my data. I can access it from my Zorin PC. I need this HDD to be accessible over the network. In Windows it was easy to share the contents of this HDD.

I need help to make it possible using the Zorin OS.

Hello,

Install Samba

Update your system

Update your system before installing Samba. Run below command to update your system.

sudo apt update && sudo apt upgrade -y

Install Samba

To install Samba, use the following command.

sudo apt install samba cifs-utils -y

Configure Samba

Samba’s configuration file is located in /etc/samba/smb.conf. You can customize it by editing this file.

Edit configuration file

Edit Samba configuration file and add the lines given in next step.

sudo nano /etc/samba/smb.conf

2. Setup shared directory

Add the following section at the end of the file and save your configuration file.

[SharedFolder]
path = /path/to/shared/folder
browseable = yes
writable = yes
guest ok = no
read only = no

Replace /path/to/shared/folder with the folder path you want to share.

Note: If you have made any changes to the configuration file, you have to restart Samba service.

Create a Shared directory

If the given folder in the configuration file doesn’t exist, you have to create it and want to apply proper permissions.

 mkdir -p /path/to/shared/folder
 chmod -R 775 /path/to/shared/folder

Add a Samba User

sudo adduser <username>
sudo smbpasswd -a <username>

Note: Ensure the password is set for both the system and Samba.

Start and Enable Samba service

Restart Samba

Once the changes are made, restart samba using the following command.

sudo systemctl restart smbd

Enable Samba to start on Reboot

sudo systemctl enable smbd

Check Samba Status

sudo systemctl status smbd

You can after install Nautilus Share to share a folder with right click in file manager

sudo apt install nautilus-share
2 Likes

One thing to check before changing smb.conf: if that old data disk is still NTFS, mount it at a fixed path first, not just by clicking it in Files. For example mount it under /mnt/data via Disks or /etc/fstab, then share that exact path.

If you share the temporary /media/yourname/... mount, Samba often works until reboot/login and then the path or permissions change. After the mount is stable, the Samba steps above are the right direction. Also test locally first with smbclient -L localhost -U youruser before debugging from the other PC.

1 Like