How do I find the current connections to a Samba server?

Samba is a free software implementation of Microsoft’s networking system. Samba provides file and print services for various Microsoft Windows clients, it can integrate with a Windows Server domain, either as a Primary Domain Controller (PDC) or as a Domain Member. It can also be part of an Active Directory domain.

ADVERTISEMENTS

You need to use smbstatus command, which report on current Samba connections. It is a very simple program to list the current Samba connections. In order to display current connection just type command:

$ smbstatus

Display more/detailed information:

$ smbstatus -b

Display verbose output:

$ smbstatus -v

Display only list of shares:

$ smbstatus -s

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
3 comments… add one
  • farshid Nov 28, 2012 @ 10:25

    smbstatus -b does not show detailed info, but brief info

    F

  • Anbarasu Mar 12, 2013 @ 10:58

    Hi,

    Is there a way to monitor particular samba share and its CPU,memory utilization ..

  • dileep Jul 8, 2014 @ 6:32

    How can i enable the samba logs so can i check the each users logs that accessing my samba share folders?

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.