Step 0: Update & Prepare
Once you are on the Pi desktop and the system is ready for you, click on the Terminal icon. We’re going to run one more update just to be certain. Enter the following text exactly as it appears here, then press Return:
sudo apt update && sudo apt full-upgrade
Once that process is finished, you are going to make certain that your system is adequately prepared for running your SSD. Again, enter the following text exactly as it appears here, then press Return:
sudo rpi-eeprom-update
Step 5: Booting
When you boot up the Pi, you should see your SSD as an icon on your desktop. If you don’t, open Terminal and run the following command:
df
Step 7: SAMBA
Samba is a network protocol that allows computers to share storage volumes. We will install it on the server, then configure it.
Any time a server is altered, you should update its system software to be certain you are using the latest, most stable version. So, begin by entering this command:
sudo apt update
Then install Samba with this command:
sudo apt install samba samba-common-bin
Now you will configure Samba:
sudo nano /etc/samba/smb.conf
Scroll down to the very end of the file and add this configuration block:
[SharedDrive]
path = /mnt/shared
browseable = yes
writable = yes
only guest = no
create mask = 0777
directory mask = 0777
public = no
valid users = pi
There are some important details to note here. First of all, the text at the top, enclosed in [ ] will be the name of the volume that you see on your computer. You can change it to whatever you like here — it doesn’t have to be “SharedDrive.” But you must remember to use the name you’ve chosen in later commands, if you change it!
...
Now that Samba is installed and configured, you will have to create Samba user authentication:
sudo smbpasswd -a pi
(Again, if you changed the user name to something other than pi, use that instead of pi in the command.)
The system will prompt you to enter a password and then verify it. Do so and write it down for now so that you don’t forget it!
The next step is to set permissions for the shared volume.
sudo chmod 777 /mnt/shared
And then:
sudo chown pi:pi /mnt/shared
(Again, if you’ve changed the user name, be sure to replace pi in the command above. And if your location is not /mnt/shared, be sure to replace it with the correct location.)
Now that Samba has been properly configured, you need to restart it:
sudo systemctl restart smbd
sudo systemctl restart nmbd
And then set Samba to start automatically when the server boots:
sudo systemctl enable smbd
sudo systemctl enable nmbd
Step 9: Guest Access
You might want other people on your network to have access to the server. Or you might just want to avoid putting in your name and password every time you connect. If so, you can enable guest access, which allows anyone to connect to the server, so long as they have the address.
Enabling guest access is easy. Once again, we will edit the Samba configuration:
sudo nano /etc/samba/smb.conf
Scroll down and change this line:
only guest = no
to read this instead:
guest ok = yes
Change the line that reads:
public = no
to:
public = yes
Lastly, delete the line that begins
valid users
Save and close out of the editor, then restart Samba as before:
sudo systemctl restart smbd
sudo systemctl restart nmbd
Now when you connect to the server with the steps from Step 7, you will not have to authenticate — your server will open immediately for you.