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
First you need to update the apt cache and install the required software components. Open terminal and paste:
The command above will install necessary packages with their dependencies.
Manage Users
When deploy complete, we make and setup consumer to gain resources.
Do it:
Change "user1" with the actual username
Upon completion of the creation process, we should create a password:
And then assign the Samba group:
Preparing Shared Catalogs
After creating and configuring users, we create shares to which they will have access. Create a folder share1 along the path / media
Next, edit the Samba configuration file with a text editor, in this case nano:
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 user1:
path = /media/share1
read only = no
guest ok = no
valid users = user1
After making these, directory "share1" will be accessible for user1.
Restart Samba
After changing the settings, the service should be restarted:
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. To check from the server itself, you can use the smbclient utility, which should first be installed:
And then verify:
Or by opening the file manager on another computer and typing in the address bar:
"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.