Spread the love

Samba is a free software re-implementation of the SMB networking protocol, and was originally developed by Andrew Tridgell. Samba provides file and print services for various Microsoft Windows clients and can integrate with a Microsoft Windows Server domain, either as a Domain Controller (DC) or as a domain member. As of version 4, it supports Active Directory and Microsoft Windows NT domains.

Samba runs on most Unix, OpenVMS and Unix-like systems, such as Linux, Solaris, AIX and the BSD variants, including Apple’s macOS Server, and macOS client (Mac OS X 10.2 and greater). Samba is standard on nearly all distributions of Linux and is commonly included as a basic system service on other Unix-based operating systems as well. Samba is released under the terms of the GNU General Public License. The name Samba comes from SMB (Server Message Block), the name of the proprietary protocol used by the Microsoft Windows network file system.


sudo apt-get install samba
Code language: JavaScript (javascript)

Add user for samba

sudo smbpasswd -a sonik

Make a directory to share:

mkdir /home/sonik/sarg mkdir /home/sonik/public
Code language: PHP (php)

Edit the config file:

pico /etc/samba/smb.conf

Add at the bottom of the file the new directory that we created:

[sarg] # This share allows only authenticated users path = /home/sonik/sarg available = yes valid users = sonik read only = no browseable = yes public = yes writable = yes [guest] # This share allows anonymous (guest) access # without authentication! path = /home/sonik/public read only = no guest ok = yes
Code language: PHP (php)

Restart samba:

sudo /etc/init.d/samba restart

Test samba config:

sudo testparm

How to check samba version?


Leave a Reply