samba (software)

{{short description|Free software re-implementation of the SMB networking protocol}}

{{about|computer software||Samba (disambiguation)}}

{{Primary sources|date=February 2011}}

{{Use dmy dates|date=June 2017}}

{{Infobox software

| name = Samba

| logo = 225px

| screenshot =

| caption =

| collapsible =

| author =

| developer =

| released = {{release date and age|df=yes|1992}}{{cite web

| url = https://www.samba.org/samba/latest_news.html

| title = Samba Latest News

| access-date = 28 November 2017}}

| discontinued =

| latest release version = {{wikidata|property|preferred|references|edit|Q1830735|P348|P548=Q2804309}}

| latest release date = {{wikidata|qualifier|preferred|single|Q1830735|P348|P548=Q2804309|P577}}

| latest preview version = {{wikidata|property|preferred|references|edit|Q1830735|P348|P548=Q51930650}}

| latest preview date = {{wikidata|qualifier|preferred|single|Q1830735|P348|P548=Q51930650|P577}}

| programming language = C, Python

| operating system = Multiplatform

| platform =

| size =

| language =

| genre = Network file system

| license = 2008: GPL-3.0-or-later{{efn|GPL-3.0-or-later and LGPL-3.0-or-later since 2008-07-01, version 3.2.0.{{cite web|url=https://www.samba.org/samba/devel/copyright-policy.html|title=Samba Copyright Policy}}}}
1993: GPL-2.0-or-later{{efn|GPL-2.0-or-later from 1993, version 1.5, until 2009-10-01, version 3.0.37.}}
1992: Proprietary{{efn|Proprietary from 1992 until 1993.}}

| website = {{URL|https://www.samba.org}}

| latest_preview_date =

}}

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{{Cite web |title=Samba - opening windows to a wider world |url=https://www.samba.org/ |access-date=2024-01-16 |website=www.samba.org}} 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-like systems, such as Linux, Solaris, AIX and the BSD variants, including Apple macOS (Mac OS X 10.2 and greater) and macOS Server. Samba also runs on a number of other operating systems such as OpenVMS and IBM i. 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.

Early history

Andrew Tridgell developed the first version of Samba Unix in December 1991 and January 1992, as a PhD student at the Australian National University, using a packet sniffer to do network analysis of the protocol used by DEC Pathworks server software. It did not have a formal name at the time of the first releases, versions 0.1, 0.5, and 1.0, all from the first half of January 1992; Tridgell simply referred to it as "a Unix file server for Dos Pathworks." He understood that he had "in fact implemented the netbios protocol" at the time of version 1.0 and that "this software could be used with other PC clients."{{fact|date=April 2023}}

With a focus on interoperability with Microsoft's LAN Manager, Tridgell released "netbios for unix", observer, version 1.5 in December 1993. This release was the first to include client-software as well as a server. Also, at this time GPL2 was chosen as license.{{fact|date=April 2023}}

Midway through the 1.5-series, the name was changed to smbserver. However, Tridgell got a trademark notice from the company "Syntax", who sold a product named TotalNet Advanced Server and owned the trademark for "SMBserver". The name "Samba" was derived by running the Unix command grep through the system dictionary looking for words that contained the letters S, M, and B, in that order (i.e. {{code|2=bash|grep -i '^s.*m.*b' /usr/share/dict/words}}).{{cite web |url=http://www.rxn.com/services/faq/smb/samba.history.txt |title=A bit of history and a bit of fun |access-date=28 May 2009 |date=27 June 1997 | author=Andrew Tridgell and the Samba Team | url-status=dead | archive-url=https://web.archive.org/web/20200815183730/http://www.rxn.com/services/faq/smb/samba.history.txt | archivedate=15 August 2020}}

Versions 1.6, 1.7, 1.8, and 1.9 followed relatively quickly, with the latter being released in January 1995. Tridgell considers the adoption of CVS in May 1996 to mark the birth of the Samba Team, though there had been contributions from other people, especially Jeremy Allison, previously.{{cite web|url=https://samba.org/samba/docs/10years.html|title=10 years of Samba!|access-date=21 September 2015}}

Version 2.0.0, released in January 1999, was a major release, support for authentication from Windows NT Primary Domain Controller, 64 bit filesystem support for very large files, and exposure of OPLOCKS to unix systems.{{Citation needed|date=October 2024}} Version 2.2.0 released in April 2001.{{Citation needed|date=October 2024}}

Version history

{{Version|l|show=111111}}

class="wikitable sortable"

!Date!!Version!!Description

{{dts|format=dmy|2003-09-23}}{{version|o|3.0}}Active Directory support.{{cite web|url=https://www.samba.org/samba/history/samba-3.0.0.html|title=Samba Team announces the first official release of Samba 3.0

|access-date=24 September 2003}} The 3.0.x series officially reached end-of-life on 5 August 2009.{{cite web |title=Release Planning for Samba 3.0 |url=https://wiki.samba.org/index.php/Release_Planning_for_Samba_3.0 |access-date=21 September 2015}}

{{dts|format=dmy|2008-07-01}} {{cite web |title=Release Planning for Samba 3.2 |url=https://wiki.samba.org/index.php/Release_Planning_for_Samba_3.2 |access-date=21 September 2015}}{{version|o|3.2}}It will be updated on an as-needed basis for security issues only.{{cite web|url=https://lists.samba.org/archive/samba-announce/2008/000145.html|title=[ANNOUNCE] Samba 3.2.0 Available for Download|access-date=21 September 2015}}{{cite web |title=Monday, April 28 - Samba Mashup Report |url=https://lists.samba.org/archive/samba-announce/2008/000136.html |access-date=21 September 2015}} There was a change of license from GPL2 to GPL3, with some parts released under LGPL3.{{cite web |title=Samba Adopts GPLv3 for Future Releases |url=https://lists.samba.org/archive/samba-announce/2007/000122.html |access-date=21 September 2015}} The 3.2.x series officially reached EOL 1 March 2010.
{{dts|format=dmy|2009-01-27}}{{version|o|3.3}}
{{dts|format=dmy|2009-07-03}}{{version|o|3.4}}This was the first release to include both Samba 3 and Samba 4 source code.{{cite web|url=https://www.samba.org/samba/history/samba-3.4.0.html|title=Samba - Release Notes Archive|access-date=21 September 2015}}
{{dts|format=dmy|2010-03-01}}{{version|o|3.5}}This was the first release to include experimental support for SMB2.{{cite web|url=https://www.samba.org/samba/history/samba-3.5.0.html|title=Samba - Release Notes Archive|access-date=21 September 2015}}
{{dts|format=dmy|2011-08-09}}{{version|o|3.6}}This is the first branch which includes full support for SMB2.{{cite web|url=https://samba.org/samba/history/samba-3.6.0.html|title=Samba - Release Notes Archive|access-date=21 September 2015}}
{{dts|format=dmy|2012-12-11}}{{version|o|4.0}}It is a major rewrite that enables Samba to be an Active Directory domain controller, participating fully in a Windows Active Directory Domain. Its first technical preview (4.0.0TP1) was released in January 2006 after 3 years of development.{{cite web|url=https://www.samba.org/samba/news/releases/4.0.0.html|title=Samba - opening windows to a wider world|access-date=21 September 2015}}{{cite web |url=https://news.samba.org/releases/4.0.0tp1/ |title=Samba 4.0.0TP1 Available for Download |access-date=11 January 2014 |archive-url=https://web.archive.org/web/20060722050801/http://news.samba.org/releases/4.0.0tp1/ |archive-date=22 July 2006 |url-status=dead |df=dmy-all}}
{{dts|format=dmy|2013-10-10}}{{version|o|4.1}}support for SMB3
{{dts|format=dmy|2015-03-04}}{{version|o|4.2}}Btrfs based file compression, snapshots and winbind integration{{cite web|url=https://www.samba.org/samba/history/samba-4.2.0.html|title=Samba - Release Notes Archive|access-date=21 September 2015}}
{{dts|format=dmy|2015-09-08}}{{version|o|4.3}}New Logging features, SMB 3.1.1 support{{cite web|url=https://www.samba.org/samba/history/samba-4.3.0.html|title=Samba - Release Notes Archive|access-date=8 September 2015}}
{{dts|format=dmy|2016-03-22}}{{version|o|4.4}}Asynchronous flush requests{{cite web|url=https://www.samba.org/samba/history/samba-4.4.0.html|title=Samba - Release Notes Archive|access-date=22 March 2016}}
{{dts|format=dmy|2016-09-07}}

|{{version|o|4.5}}

|NTLM v1 disabled by default, Virtual List View, Various performance improvements

{{dts|format=dmy|2017-03-07}}

|{{version|o|4.6}}

|Multi-process Netlogon support

{{dts|format=dmy|2017-09-21}}

|{{version|o|4.7}}

|Samba AD with MIT Kerberos

{{dts|format=dmy|2018-03-13}}

|{{version|o|4.8}}

|Apple Time Machine Support. Setups using 'domain' or 'ads' security modes now require 'winbindd' to be running.{{cite web

| title = Release Notes for Samba 4.8.0

| date = 13 March 2018

| url = https://www.samba.org/samba/history/samba-4.8.0.html

| access-date = 2019-03-19}}

{{dts|format=dmy|2018-09-13}}

|{{version|o|4.9}}

|Many changes{{cite web | url=https://www.samba.org/samba/history/samba-4.9.0.html | title=Samba 4.9.0 - Release Notes }}

{{dts|format=dmy|2019-03-19}}

|{{version|o|4.10}}

|

{{dts|format=dmy|2019-09-17}}

|{{version|o|4.11}}

|SMB1 is disabled by default as a mitigation for the WannaCry vulnerability.

{{dts|format=dmy|2020-03-03}}

|{{version|o|4.12}}

|

{{dts|format=dmy|2020-09-22}}

|{{version|o|4.13}}

|Samba 4.13 raises the minimum version of Python to 3.6.

{{dts|format=dmy|2021-03-09}}

|{{version|o|4.14}}

|Major overhaul of VFS subsystem and more.{{cite web | url=https://www.samba.org/samba/history/samba-4.14.0.html | title=Samba 4.14.0 - Release Notes }}

{{dts|format=dmy|2021-09-20}}

|{{version|o|4.15}}

|Many changes.{{cite web | url=https://www.samba.org/samba/history/samba-4.15.0.html | title=Samba 4.15.0 - Release Notes }}

{{dts|format=dmy|2022-03-21}}

|{{version|o|4.16}}

|Many changes.{{cite web | url=https://www.samba.org/samba/history/samba-4.16.0.html | title=Samba 4.16.0 - Release Notes }}

{{dts|format=dmy|2022-09-13}}

|{{version|co|4.17}}

|Many changes.{{cite web | url=https://www.samba.org/samba/history/samba-4.17.0.html | title=Samba 4.17.0 - Release Notes }}

{{dts|format=dmy|2023-03-8}}

|{{version|co|4.18}}

|Many changes.{{cite web | url=https://www.samba.org/samba/history/samba-4.18.0.html | title=Samba 4.18.0 - Release Notes }}

{{dts|format=dmy|2023-09-4}}

|{{version|co|4.19}}

|Many changes.{{cite web | url=https://www.samba.org/samba/history/samba-4.19.0.html | title=Samba 4.19.0 - Release Notes }}

{{dts|format=dmy|2024-03-27}}

|{{version|c|4.20}}

|Many changes.{{cite web | url=https://www.samba.org/samba/history/samba-4.20.0.html | title=Samba 4.20.0 - Release Notes }}

Security

Some versions of Samba 3.6.3 and lower suffer serious security issues which can allow anonymous users to gain root access to a system from an anonymous connection, through the exploitation of an error in Samba's remote procedure call.[https://www.samba.org/samba/security/CVE-2012-1182 CVE-2012-1182] - A security announcement regarding a major issue with Samba 3.6.3 and lower.

On 12 April 2016, Badlock,{{cite web |title=Badlock |url=http://badlock.org/ |url-status=dead |archive-url=https://web.archive.org/web/20160412215511/http://badlock.org/ |archive-date=12 April 2016 |access-date=12 April 2016}} a crucial security bug in Windows and Samba, was disclosed. Badlock for Samba is referenced by CVE|2016-2118 (SAMR and LSA man in the middle attacks possible).{{cite news|url=http://www.listythings.com/microsoft-samba-patch-badlock-vulnerability/|title=Microsoft, Samba Patch "Badlock" Vulnerability|access-date=13 April 2016}}

On 24 May 2017, it was announced that a remote code execution vulnerability had been found in Samba named EternalRed or SambaCry, affecting all versions since 3.5.0.{{cite web|url=https://www.samba.org/samba/history/samba-4.6.4.html|title=Samba 4.6.4 - Release Notes|date=24 May 2017|access-date=24 May 2017}} This vulnerability was assigned identifier CVE|2017-7494.{{cite news|url=https://securelist.com/sambacry-is-coming/78674/|title=SambaCry is coming|work=Securelist - Kaspersky Lab’s cyberthreat research and reports|access-date=2018-03-19|language=en-us}}

On 14 September 2020, a proof-of-concept exploit for the netlogon vulnerability called Zerologon (CVE|2020-1472) for which a patch exists since August was published.{{cite news |last1=Cimpanu |first1=Catalin |title=Microsoft says it detected active attacks leveraging Zerologon vulnerability |url=https://www.zdnet.com/article/microsoft-says-it-detected-active-attacks-leveraging-zerologon-vulnerability/ |access-date=9 October 2020 |work=ZDNet |language=en}} Some federal agencies using the software have been ordered to install the patch.{{cite web |last1=Constantin |first1=Lucian |title=What is Zerologon? And why to patch this Windows Server flaw now |url=https://www.csoonline.com/article/3576193/what-is-zerologon-why-you-should-patch-this-critical-windows-server-flaw-now.html |website=CSO Online |access-date=9 October 2020 |language=en |date=23 September 2020}}

Features

Samba allows file and print sharing between computers running Microsoft Windows and computers running Unix. It is an implementation of dozens of services and a dozen protocols, including:

  • NetBIOS over TCP/IP (NBT)
  • SMB (known as CIFS in some versions)
  • Samba supports POSIX extensions for CIFS/SMB. The initial extension was CIFS VFS (CAP_UNIX) from 2004, which has been somewhat superseded by SMB3.{{cite web |title=UNIX Extensions |url=https://wiki.samba.org/index.php/UNIX_Extensions |website=SambaWiki}}
  • DCE/RPC or more specifically, MSRPC, the Network Neighborhood suite of protocols
  • A WINS server also known as a NetBIOS Name Server (NBNS)
  • The NT Domain suite of protocols which includes NT Domain Logons
  • Security Account Manager (SAM) database
  • Local Security Authority (LSA) service
  • NT-style printing service (SPOOLSS)
  • NTLM
  • Active Directory Logon using modified versions of Kerberos and LDAP
  • DFS server

All these services and protocols are frequently incorrectly referred to as just NetBIOS or SMB. The NBT (NetBIOS over TCP/IP) and WINS protocols, and their underlying SMB version 1 protocol, are deprecated on Windows. Since Windows Vista the WS-Discovery protocol has been included along with SMB2 and its successors, which supersede these. (WS-Discovery is implemented on Unix-like platforms by third party daemons which allow Samba shares to be discovered when the deprecated protocols are disabled).

Samba sets up network shares for chosen Unix directories (including all contained subdirectories). These appear to Microsoft Windows users as normal Windows folders accessible via the network. Unix users can either mount the shares directly as part of their file structure using the mount.cifs command or, alternatively, can use a utility, smbclient (libsmb) installed with Samba to read the shares with a similar interface to a standard command line FTP program. Each directory can have different access privileges overlaid on top of the normal Unix file protections. For example: home directories would have read/write access for all known users, allowing each to access their own files. However they would still not have access to the files of others unless that permission would normally exist. Note that the netlogon share, typically distributed as a read only share from /etc/samba/netlogon, is the logon directory for user logon scripts.

Samba services are implemented as two daemons:

  • smbd, which provides the file and printer sharing services, and
  • nmbd, which provides the NetBIOS-to-IP-address name service. NetBIOS over TCP/IP requires some method for mapping NetBIOS computer names to the IP addresses of a TCP/IP network.

Samba configuration is achieved by editing a single file (typically installed as /etc/smb.conf or /etc/samba/smb.conf). Samba can also provide user logon scripts and group policy implementation through poledit.

Samba is included in most Linux distributions and is started during the boot process. On Red Hat, for instance, the /etc/rc.d/init.d/smb script runs at boot time, and starts both daemons. Samba is not included in Solaris 8, but a Solaris 8-compatible version is available from the Samba website. The OS/2-based ArcaOS includes Samba to replace the old IBM LAN Server software.{{cite web|access-date=2020-09-11|website=arcanoae.com|url=https://www.arcanoae.com/wiki/arcamapper/|title=ArcaMapper}}

Samba includes a web administration tool called Samba Web Administration Tool (SWAT).{{cite web|url=http://us3.samba.org/samba/docs/man/Samba-HOWTO-Collection/SWAT.html|title=Chapter 37. SWAT: The Samba Web Administration Tool|access-date=21 September 2015}}{{cite web|url=https://www.linux.com/news/swat-your-samba-problems/|title=SWAT your Samba problems|date=31 January 2008|publisher=linux.com}}

SWAT was removed starting with version 4.1.{{cite web|url=https://wiki.samba.org/index.php/Samba_4.1_Features_added/changed|title=Samba 4.1 Features added/changed|access-date=21 September 2015}}

Samba TNG

{{update section|date=January 2016}}

Samba TNG (The Next Generation) was forked in late 1999, after disagreements between the Samba Team leaders and Luke Leighton about the directions of the Samba project. They failed to come to an agreement on a development transition path which allowed the research version of Samba he was developing (known at the time as Samba-NTDOM) to slowly be integrated into Samba.{{cite web

| title = Project FAQ - What is the relationship between Samba and Samba TNG?

| url = https://wiki.samba-tng.org/doku.php/pages/faq#what_is_the_relationship_between_samba_and_samba-tng

| access-date = 19 February 2008}} Development has been minimal, due to a lack of developers. The Samba TNG team frequently directed potential users towards Samba because of its better support and development.{{cite web

| title = Project FAQ - Which should I use - Samba or Samba TNG?

| url = https://wiki.samba-tng.org/doku.php/pages/faq#which_should_i_use_-_samba_or_samba-tng

| access-date = 19 February 2008}}

A key goal of the Samba TNG project was to rewrite all of the NT Domains services as FreeDCE projects.{{cite web

| title = Project FAQ - What's all this about FreeDCE?

| url = https://wiki.samba-tng.org/doku.php/pages/faq#what_s_all_this_about_freedce

| access-date = 19 February 2008}} This was made difficult as the services were developed manually through network reverse-engineering, with limited or no reference to DCE/RPC documentation.{{citation needed|date=February 2008}}

A key difference from Samba was in the implementation of the NT Domains suite of protocols and MSRPC services. Samba makes all the NT Domains services available from a single place, whereas Samba TNG separated each service into its own program.{{citation needed|date=February 2008}}

ReactOS started using Samba TNG services for its SMB implementation. The developers of both projects were interested in seeing the Samba TNG design used to help get ReactOS talking to Windows networks. They worked together to adapt the network code and build system. The multi-layered and modular approach made it easy to port each service to ReactOS.{{cite web

| title = Interview with Steven Edwards

| url = http://www.winehq.org/?interview=14

| access-date = 19 February 2008

| publisher = Wine HQ

| last = Vincent

| first = Brian}}

See also

{{Portal|Free and open-source software}}

Notes

{{Notelist}}

References

{{Reflist}}