36

Is there a command line way to see what version of Samba I am running?

peterh
  • 4,953
  • 13
  • 30
  • 44
Crash893
  • 747
  • 2
  • 15
  • 30
  • 5
    Please make sure you're running 4.6.4/4.5.10/4.4.14 or up, to avoid the critical CVE-2017-7494 vulnerability ("**SambaCry**"). – David Refoua May 25 '17 at 23:25
  • And 4.13.17, 4.14.12 and 4.15.5 for [CVE-2021-44142](https://www.samba.org/samba/security/CVE-2021-44142.html), and surely others in future. – msanford Feb 02 '22 at 02:28

3 Answers3

36

Use the smbstatus command from the shell to get an output like this Samba version 3.0.25b-1.el5_1.4

Gomibushi
  • 1,313
  • 1
  • 12
  • 21
27

Just enter below command on your terminal

smbd -V
Sven
  • 98,649
  • 14
  • 180
  • 226
LOKESH
  • 391
  • 3
  • 6
  • 2
    Works! Don't understand the downvote. – Martin_W Nov 08 '16 at 04:03
  • idk, I just tried this command and it gave me the Linux kernel version if you run it from Ubuntu 16.04 – Gabriel Fair Apr 20 '18 at 14:29
  • 1
    This command gives the Samba version and not the SMB version. Already upvoted. Maybe someone is misunderstanding the difference between the smbd (Samba daemon) and SMB (Communication protocol). – Terrance Jun 21 '18 at 03:09
  • I just tried in Debian 9.13 and both `smbd -V` and `smbstatus` show exactly the same version, this case *Samba version 4.13.13-Debian* – LincolnP Jun 08 '22 at 10:22
3

For the Linux Samba version type :

$ smbstatus -V
Version 4.6.14-SerNet-RedHat-16.el7

But I guess your domain controller needs is the SMB Protocol version you are using, you can find it by typing :

# smbstatus -p
PID     Username     Group        Machine                           Protocol Version  Encryption           Signing
----------------------------------------------------------------------------------------------------------------------------------------
226861  nobody       nogroup      10.0.0.55 (ipv4:10.0.0.55:61866)  SMB3_11           -                    partial(AES-128-CMAC)

 
SebMa
  • 359
  • 1
  • 10