Intro
Samba is a protocol for exchanging information, its purpose is to implement enterprise-level file access applications and operate them on an enterprise LAN. Next, we'll walk through the process of configuring Samba on Debian, which consists of several steps.
Installing additional applications
Beginning we must deploy required software components
Open terminal and paste:
sudo apt install samba
After completion of execution, Samba and the necessary dependencies will be deployed.
Manage Users
When deploy complete, we make and setup consumer to gain resources.
Do it:
sudo useradd -m user1
Change "user1" with the actual username.
Upon completion of the creation process, we must create a password :
sudo passwd user1
And then assign the Samba group :
sudo smbpasswd -a user1
Preparing Shared Catalogs
After configuring users, make our consumer to gain resources.
Do it this by modifying config file by open it in text, for example, nano :
sudo nano /etc/samba/smb.conf
It is used for creation shared folders, grant access to them, and other important service settings.
Now make new resource and define access rights to it.
Make a folder "share1", set permissions for everybody:
[share1] path = /media/share1
read only = no
guest ok = yes
After making these, directory "share1" will be readable and writable by everyone.
Restart Samba
After modifying the settings the service must be restarted:
sudo systemctl restart smb.service
This command will restart the Samba service and commit any changes made to the configuration.
Availability check
Once configured, you can test access to shared folders from another host on the network.
Let's do this by opening a file manager on another computer and typing in the address bar:
\\Debian_server_IP\share1
"Debian_server_IP" is the IP address of the newly configured server.
If everything was done correctly, then as a result you should see the contents of the "share1" folder.
Conclusion
Samba is a file sharing and network sharing tool.
The article describes the basic settings of this service in Debian Linux OS.