{"id":1616,"date":"2022-08-08T04:40:43","date_gmt":"2022-08-08T04:40:43","guid":{"rendered":"https:\/\/matob.web.id\/news\/?p=1616"},"modified":"2022-08-08T04:41:00","modified_gmt":"2022-08-08T04:41:00","slug":"samba-server-definition-functions-and-how-to-install","status":"publish","type":"post","link":"https:\/\/matob.web.id\/news\/samba-server-definition-functions-and-how-to-install\/","title":{"rendered":"Samba Server: Definition, Functions, and How to Install"},"content":{"rendered":"<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Are you looking for information about <a href=\"https:\/\/matob.web.id\/news\/samba-server-definition-functions-and-how-to-install\/\">what is <\/a><\/span><\/span><a href=\"https:\/\/matob.web.id\/news\/samba-server-definition-functions-and-how-to-install\/\"><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">a samba server<\/span><\/span><\/a><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\"> ? <\/span><span style=\"vertical-align: inherit;\">Exactly you visited this article, because we will provide information about what <\/span><\/span><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">a samba server<\/span><\/span><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\"> is . <\/span><span style=\"vertical-align: inherit;\">Creating a website is not a simple job. <\/span><span style=\"vertical-align: inherit;\">Website creation can only be done by people with coding skills.<\/span><\/span><\/p>\n<h2><strong><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Understanding, Functions, and How to Install Samba Server<\/span><\/span><\/strong><\/h2>\n<h3><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">A. Understanding Samba Server<\/span><\/span><\/h3>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Surely some of you have used the FTP (File Transfer Protocol) protocol to share data or printer services on Windows OS together. <\/span><span style=\"vertical-align: inherit;\">As it turns out, you can also rely on another program that works on the UNIX family of operating systems called Samba Server.<\/span><\/span><\/p>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Samba Server is a program with a client server protocol that can be likened to a bridge that connects the service provision process to share data or documents between the UNIX family of operating systems and Microsoft Windows operating systems.<\/span><\/span><\/p>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">This software operates under the auspices of the UNIX family operating system platform using the SMB protocol which is also used by the Microsoft Windows operating system to function as a client server network in the process of using data and resources that you want to support together in a network.<\/span><\/span><\/p>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">This software is open source (free creation\/distribution) which allows files across Windows and Unix operating systems to be shared simply and easily.<\/span><\/span><\/p>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">This program serves things like file sharing, NetBIOS name resolution printer sharing, and service announcements. <\/span><span style=\"vertical-align: inherit;\">Like a file server application, Samba allows files, printers, and other resources to be shared by multiple users on UNIX OS, and allows interoperability with Windows OS.<\/span><\/span><\/p>\n<h3><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">B. Samba Server Functions<\/span><\/span><\/h3>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">After studying the meaning of <a href=\"https:\/\/matob.web.id\/news\/samba-server-definition-functions-and-how-to-install\/\">Samba Server<\/a>, you may already understand a little about its functions. <\/span><span style=\"vertical-align: inherit;\">The following are some of the functions of the samba server:<\/span><\/span><\/p>\n<ul>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Serves as a bridge between the UNIX operating system and the Microsoft Windows operating system in connecting file sharing or document sharing, printing equipment sharing and other supporting devices.<\/span><\/span><\/li>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Functions as a Primary Domain Controller (PDC) that authenticates users who have permission to access the resources provided.<\/span><\/span><\/li>\n<\/ul>\n<h3><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">C. Advantages of Samba Server<\/span><\/span><\/h3>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">The samba program is trusted and used by many people because of the various advantages it offers. <\/span><span style=\"vertical-align: inherit;\">Its advantages include free, good performance in resource sharing, reliable because it rarely experiences problems, is available for various platforms, supports various UNIX family operating systems, is directly connected to the network, easy to configure and use according to administrator needs.<\/span><\/span><\/p>\n<h3><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">D. Samba Server Components<\/span><\/span><\/h3>\n<ul>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Smbd is a daemon or background program that actually manages file system and printer sharing services for clients. <\/span><span style=\"vertical-align: inherit;\">Smbd will duplicate itself when the client authenticates, the original part will return to port 139 to listen for new requests and the duplicate part will take care of the connection to the client.<\/span><\/span><\/li>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">The nmbd background program handles NetBIOS name server requests. <\/span><span style=\"vertical-align: inherit;\">Unlike smbd, nmbd does not duplicate itself to handle every query.<\/span><\/span><\/li>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Smbclient is an application to access SMB resource shares with a view resembling FTP.<\/span><\/span><\/li>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Smbtar is a program that suggests shared data.<\/span><\/span><\/li>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Nmblookup is a program that helps lookup names using NetBIOS over TCP\/IP. <\/span><span style=\"vertical-align: inherit;\">Nmblookup can be used to resolve computer names to IP numbers or vice versa.<\/span><\/span><\/li>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Smbpasswd is a program that allows administrators to set the encrypted password used by the Samba Server.<\/span><\/span><\/li>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Smbstatus is a program that monitors the latest status of shared resources provided by the Samba Server.<\/span><\/span><\/li>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Testparm is a small program for debugging Samba configuration files.<\/span><\/span><\/li>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Samba Web Administration Tool or abbreviated as Swat is a program that provides a web model interface for administering Samba. <\/span><span style=\"vertical-align: inherit;\">With the support of very useful help files, Swat makes it easy to edit Samba configuration files, manage resource shares and view the latest Samba status.<\/span><\/span><\/li>\n<\/ul>\n<h3><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">E. How to Install Samba Server<\/span><\/span><\/h3>\n<ol>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Make sure you are connected to the network and have an IP Address for your Ubuntu Server.<\/span><\/span><\/li>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">If you have got an IP address, then install Samba Server on Ubuntu Server 20.04 by running the following command:<\/span><\/span><\/li>\n<\/ol>\n<ul>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">To update or update the repository<\/span><\/span><\/li>\n<\/ul>\n<pre><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">sudo apt update<\/span><\/span><\/pre>\n<ul>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">To install Samba server<\/span><\/span><\/li>\n<\/ul>\n<pre><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">sudo apt install samba<\/span><\/span><\/pre>\n<ol start=\"3\">\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">After the Samba Server has been successfully installed, please check again by entering the following command:<\/span><\/span><\/li>\n<\/ol>\n<pre><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">whereis samba<\/span><\/span><\/pre>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">The command will display the location where the Samba Server is installed, both the location of the configuration file and other things in case you need it later.<\/span><\/span><\/p>\n<h3><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">F. How to Configure Samba Server<\/span><\/span><\/h3>\n<h4><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">1. Setting Global Samba Server<\/span><\/span><\/h4>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Before sharing a resource, you must first create a file or directory to share. <\/span><span style=\"vertical-align: inherit;\">There are two types of access in this installation:<\/span><\/span><\/p>\n<ul>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Samba access uses anonymous credentials, which do not require a username and password to access them.<\/span><\/span><\/li>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Samba that requires a username and password to access<\/span><\/span><\/li>\n<\/ul>\n<ol>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">For this setting you need to edit the Samba configuration file found in \/etc\/samba\/smb.conf. <\/span><span style=\"vertical-align: inherit;\">Back up the original Samba configuration file first by running the following command:<\/span><\/span><\/li>\n<\/ol>\n<pre><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">sudo cp \/etc\/samba\/smb.conf \/etc\/samba\/smb.conf.asli<\/span><\/span><\/pre>\n<ol>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Please start by creating a folder that will be shared using the Samba Server.<\/span><\/span><\/li>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">After the folder has been successfully created, now you have to do a short configuration on the smb.conf file located in \/etc\/samba\/. <\/span><span style=\"vertical-align: inherit;\">Run the following command to make edits to the Samba configuration:<\/span><\/span><\/li>\n<\/ol>\n<pre><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">sudo nano \/etc\/samba\/smb.conf<\/span><\/span><\/pre>\n<ol>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">After editing the samba configuration, add or change the configuration to the following:<\/span><\/span><\/li>\n<\/ol>\n<pre>[global]\r\n\r\nserver min protocol = NT1\r\n\r\nlanman auth = yes\r\n\r\nntlm auth = yes\r\n\r\nsecurity = user<\/pre>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">For those of you who use Windows OS devices, make sure they are in the same workgroup, for example in this installation use a workgroup with the name &#8220;WORKGROUP&#8221;<\/span><\/span><\/p>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Run the command to restart Samba<\/span><\/span><\/p>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">sudo systemctl restart smbd<\/span><\/span><\/p>\n<h4><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">2. Setting Anonymous Samba Server<\/span><\/span><\/h4>\n<p><strong><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Create a samba directory that can be accessed anonymously. <\/span><\/span><\/strong><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">This example will use the \u201c\/srv\/samba\/anonymous_shares\u201d folder. <\/span><span style=\"vertical-align: inherit;\">Run the following command:<\/span><\/span><\/p>\n<pre><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">sudo mkdir -p \/srv\/samba\/anonymous_shares<\/span><\/span><\/pre>\n<p><strong><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Setting permissions<\/span><\/span><\/strong><\/p>\n<pre>sudo chmod -R 0775 \/srv\/samba\/anonymous_shares\r\n\r\nsudo chown -R nobody:nogroup \/srv\/samba\/anonymous_shares<\/pre>\n<p><strong><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Edit configuration file<\/span><\/span><\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-8770\" src=\"https:\/\/matob.web.id\/wp-content\/uploads\/2022\/07\/anonimus-edit-file-300x213.jpg\" alt=\"samba server\" width=\"300\" height=\"213\" title=\"\"><\/p>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Adjust the settings in the Samba configuration to allow anonymous access. <\/span><span style=\"vertical-align: inherit;\">Run the following command:<\/span><\/span><\/p>\n<pre><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">sudo nano \/etc\/samba\/smb.conf<\/span><\/span><\/pre>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">The next step is to add the following line to the bottom line:<\/span><\/span><\/p>\n<pre>[Anonymous]\r\n\r\ncomment = Anonymous File Server Share\r\n\r\npath = \/srv\/samba\/anonymous_shares\r\n\r\nbrowsable =yes\r\n\r\nwritable = yes\r\n\r\nguest ok = yes\r\n\r\nread only = no\r\n\r\nforce user = nobody<\/pre>\n<p><strong><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Restart <\/span><\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/Samba_(software)\" target=\"_blank\" rel=\"noopener\"><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Samba<\/span><\/span><\/a><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\"> by running the command<\/span><\/span><\/strong><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\"> :<\/span><\/span><\/p>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">sudo systemctl restart smbd<\/span><\/span><\/p>\n<h4><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">3.\u00a0 Setting Secure Samba Server<\/span><\/span><\/h4>\n<ul>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Create a new group to add Samba access with credentials. <\/span><span style=\"vertical-align: inherit;\">This installation uses the &#8220;smbgrp&#8221; group and each user will be given a password. <\/span><span style=\"vertical-align: inherit;\">In this example, using the user &#8220;penguin&#8221; with the password &#8220;linux&#8221;. <\/span><span style=\"vertical-align: inherit;\">To add, run the following command:<\/span><\/span><\/li>\n<\/ul>\n<pre><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">sudo addgroup smbgrp <\/span><\/span>\r\n\r\n<span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">sudo useradd -s \/bin\/false penguin <\/span><\/span>\r\n\r\n<span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">sudo usermod penguin -aG smbgrp <\/span><\/span>\r\n\r\n<span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">sudo smbpasswd -a linuxpenguin<\/span><\/span><\/pre>\n<ul>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Create a samba directory (path of a group of files) that is used to share resources. <\/span><span style=\"vertical-align: inherit;\">For example, this time we will use the \u201c\/srv\/samba\/secure_shares\u201d folder. <\/span><span style=\"vertical-align: inherit;\">Done by running the command:<\/span><\/span><\/li>\n<\/ul>\n<pre><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">sudo mkdir -p \/srv\/samba\/secure_shares<\/span><\/span><\/pre>\n<ul>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Setting permissions<\/span><\/span><\/li>\n<\/ul>\n<pre>sudo chmod -R 0770 \/srv\/samba\/secure_shares\r\n\r\nsudo chown -R root:smbgrp \/srv\/samba\/secure_shares<\/pre>\n<ul>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Edit configuration file<\/span><\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-8767\" src=\"https:\/\/matob.web.id\/wp-content\/uploads\/2022\/07\/edit-file-konfigurasi-300x215.jpg\" alt=\"\" width=\"300\" height=\"215\" title=\"\"><\/p>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">The next step is to adjust the settings in the Samba configuration. <\/span><span style=\"vertical-align: inherit;\">So that users can login with credentials add the setting &#8220;security = user&#8221; in the global section. <\/span><span style=\"vertical-align: inherit;\">Then, run the following command:<\/span><\/span><\/p>\n<pre><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">sudo nano \/etc\/samba\/smb.conf<\/span><\/span><\/pre>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">The next step is to add the following line to the bottom line:<\/span><\/span><\/p>\n<pre>[Secure]\r\n\r\ncomment = Secure File Server Share\r\n\r\npath = \/srv\/samba\/secure_shares\r\n\r\nvalid users = @smbgrp\r\n\r\nguest ok = no\r\n\r\nwritable = yes\r\n\r\nbrowsable = yes<\/pre>\n<ul>\n<li><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Restart Samba by running the command:<\/span><\/span><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-8768\" src=\"https:\/\/matob.web.id\/wp-content\/uploads\/2022\/07\/restart-samba-server-300x215.jpg\" alt=\"\" width=\"300\" height=\"215\" title=\"\"><\/p>\n<pre><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">sudo systemctl restart smbd<\/span><\/span><\/pre>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">If you want to access the Samba Server using the secure option whose security is guaranteed, it can be done by inputting the \\\\IP address of the Ubuntu installed Samba. <\/span><span style=\"vertical-align: inherit;\">For example, using IP 10.0.2.2 then access uses the address \\\\10.0.2.2 .<\/span><\/span><\/p>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Thus the information that we can convey about what a samba server is, hopefully the information we convey about what a samba server is, is useful for you. <\/span><span style=\"vertical-align: inherit;\">For those of you who are still confused about website creation and SEO, please contact <\/span><\/span><a href=\"https:\/\/matob.web.id\/\"><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Jogja website<\/span><\/span><\/a><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\"> services or <\/span><\/span><a href=\"https:\/\/matob.web.id\/\"><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Jogja SEO services<\/span><\/span><\/a><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\"> right now.<\/span><\/span><\/p>\n<p><span style=\"vertical-align: inherit;\"><span style=\"vertical-align: inherit;\">Have A Nice Day \ud83d\ude0a<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you looking for information about what is a samba server ? Exactly you visited this article, because we will provide information about what a samba server is . Creating a website is not a simple job. Website creation can only be done by people with coding skills. Understanding, Functions, and How to Install Samba [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1618,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1616","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software"],"_links":{"self":[{"href":"https:\/\/matob.web.id\/news\/wp-json\/wp\/v2\/posts\/1616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matob.web.id\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matob.web.id\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matob.web.id\/news\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matob.web.id\/news\/wp-json\/wp\/v2\/comments?post=1616"}],"version-history":[{"count":3,"href":"https:\/\/matob.web.id\/news\/wp-json\/wp\/v2\/posts\/1616\/revisions"}],"predecessor-version":[{"id":1620,"href":"https:\/\/matob.web.id\/news\/wp-json\/wp\/v2\/posts\/1616\/revisions\/1620"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/matob.web.id\/news\/wp-json\/wp\/v2\/media\/1618"}],"wp:attachment":[{"href":"https:\/\/matob.web.id\/news\/wp-json\/wp\/v2\/media?parent=1616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matob.web.id\/news\/wp-json\/wp\/v2\/categories?post=1616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matob.web.id\/news\/wp-json\/wp\/v2\/tags?post=1616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}