Updated: 4 November 2026 · Applies to: Samba 4.22 (Debian 13), 4.23 (AlmaLinux 10, Rocky Linux 9, Ubuntu 26.04) and 4.19 (Ubuntu 24.04)

Samba does not stand for anything. It is not an acronym: the name is the ordinary word "samba", picked because it contains the letters S, M and B in that order, from SMB (Server Message Block), the Windows file and printer sharing protocol that Samba implements. Samba is the open-source software that lets Linux and Unix servers share folders and printers with Windows, macOS and Linux clients, join a Windows domain or act as a domain controller.

Where the name comes from

According to the Samba project, Andrew Tridgell wrote the first version in the first days of 1992 under the name "smbserver". In April 1994 he renamed it Samba after a company told him it held a trademark on "smbserver". The book Using Samba, published on samba.org, describes how the new name was found, by searching the Unix dictionary for words that start with s and then contain m and b:

$ grep -i '^s.*m.*b' /usr/dict/words
salmonberry
samba
sawtimber
scramble

He chose samba. Today Samba is free software under the GNU General Public License.

What SMB and CIFS mean

  • SMB, Server Message Block: the network protocol Windows uses for shared folders (\\server\share) and printers. Current systems use versions 2 and 3, and Samba no longer accepts the old SMB1 by default: in our test, Samba 4.22 used server min protocol = SMB2_02 and server max protocol = SMB3 out of the box.
  • CIFS, Common Internet File System: the name Microsoft gave its SMB specification when it submitted it to the IETF in 1996. You still see it in the Linux mount type cifs.

The three Samba server types

The server role setting in the [global] section of /etc/samba/smb.conf decides what kind of server Samba is (older guides set the same thing with security). testparm shows the role a configuration produces; we tested every example below with it.

1. Standalone server

A file or print server for a workgroup that belongs to no domain. Users log in with Samba accounts stored on the server itself (smbpasswd -a, see How to Add, List, Delete and Change Samba Users (smbpasswd, pdbedit and Failed to add entry for user)). This is the default: Debian's smb.conf sets server role = standalone server, and AlmaLinux's default security = user gives the same role.

[global]
   workgroup = WORKGROUP
   server role = standalone server

testparm -s reports Server role: ROLE_STANDALONE. A full share setup is in How to Install and Configure Samba on Ubuntu and Linux, and shares without a password in How to Configure Samba Guest and Home Shares on AlmaLinux, Rocky Linux and RHEL.

2. Domain member server

The server joins an existing domain, and users log in with their domain accounts; Samba checks passwords with a domain controller, and winbindd maps domain users to Linux users. For an Active Directory domain:

[global]
   workgroup = EXAMPLE
   realm = EXAMPLE.COM
   security = ads
   idmap config * : backend = tdb
   idmap config * : range = 3000-7999
   idmap config EXAMPLE : backend = rid
   idmap config EXAMPLE : range = 10000-999999

testparm reports Server role: ROLE_DOMAIN_MEMBER. The realm is the AD DNS domain in capitals. Without the idmap config lines, testparm stops with ERROR: Invalid idmap range for domain *!. According to the Samba wiki, you then join with net ads join -U administrator. security = domain joins an old NT4-style domain instead.

3. Domain controller

  • Active Directory domain controller (server role = active directory domain controller, testparm: ROLE_ACTIVE_DIRECTORY_DC): Samba 4 can run an AD domain that Windows clients join, with its own samba service instead of separate smbd, nmbd and winbindd. According to the Samba wiki, you set it up with samba-tool domain provision after moving the default smb.conf out of the way. Debian and Ubuntu package it as samba-ad-dc (we found 4.22.11 on Debian 13, 4.19.5 on Ubuntu 24.04 and 4.23.6 on Ubuntu 26.04).
  • On RHEL, AlmaLinux and Rocky Linux, AD DC is not available. Red Hat states that it does not support running Samba as an AD domain controller. In our tests, AlmaLinux 10 and Rocky Linux 9 offered only samba-dc-libs and no samba-dc package, and AlmaLinux 10 had no samba daemon; testparm accepts the setting, but there is nothing to run it. Use a Debian or Ubuntu server for a Samba AD DC.
  • Classic (NT4) primary or backup domain controller (server role = classic primary domain controller, testparm: ROLE_DOMAIN_PDC): still accepted, but Red Hat advises against new NT4 domains because Windows versions after Windows 7 and Windows Server 2008 R2 do not support them.

Samba's manual also lists an "IPA primary domain controller" role, which IPA installers configure for you; do not set it by hand.

Old settings that no longer work

Many older guides, including the earlier version of this article, use settings that current Samba rejects. In our tests with Samba 4.22:

security = share   →  WARNING: Ignoring invalid value 'share' for parameter 'security'
                      Error loading services.
security = server  →  WARNING: Ignoring invalid value 'server' for parameter 'security'
                      Error loading services.

Share-level security is gone; for shares without a password, use map to guest = Bad User with guest ok = yes on the share (How to Configure Samba Guest and Home Shares on AlmaLinux, Rocky Linux and RHEL). Combining security = ads with password server still loads but warns that it "should NOT be combined" because Samba finds the domain controller by itself; leave password server out.

Check which type your server is

testparm -s 2>&1 | grep "Server role"

On a fresh AlmaLinux 10 install of Samba 4.23.5 this printed Server role: ROLE_STANDALONE. If Samba does not start after a change, see Samba Service Will Not Start: How to Find and Fix the Cause; for the ports to open, see Samba Ports: 445, 139, 137 and 138 and How to Open Them Safely.

Official documentation: smb.conf (server role, security), Setting up Samba as a Domain Member and Using Samba as a server (Red Hat).

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket