2

I have a NAS Zyxel NAS326 running on Linux acting as Samba server. I can't exactly say which Linux distribution, this is all I get from "uname -a":

root@nas326:~# uname -a
Linux nas326 3.10.39 #1 Fri May 26 16:47:54 CST 2017 armv7l GNU/Linux

This is the version of Samba server running in the NAS:

root@nas326:~# smbstatus -V
Version 4.1.7

What I need is a way to get, for each Samba client, the list of mounted shares from my server, specifically with the Samba version used (either SMB2 or SMB3 since I have "min protocol = SMB2" in my smb.conf file.

If I run smbstatus (the only command I see available so far) I get:

root@nas326:~# smbstatus    

Samba version 4.1.7
PID     Username      Group         Machine                        
-------------------------------------------------------------------
25290|admin_user|everyone|192.168.1.2|ipv4:192.168.1.2:63188

Service      pid     machine       Connected at
-------------------------------------------------------
NAS326|25290|192.168.1.2|2018-03-18 09:00:26

No locked files

I was hoping it was giving out the extra info about the SMB protocol used, but that isn't the case.

For example from my MacBook Pro, acting as a Samba client, I can get the Samba version used for each share mounted (and all possible information, it seems), giving this command:

$ smbutil statshares -m /Volumes/NAS326

==================================================================================================
SHARE                         ATTRIBUTE TYPE                VALUE
==================================================================================================
NAS326                        
                              SERVER_NAME                   nas326
                              USER_ID                       502
                              SMB_NEGOTIATE                 SMBV_NEG_SMB1_ENABLED
                              SMB_NEGOTIATE                 SMBV_NEG_SMB2_ENABLED
                              SMB_NEGOTIATE                 SMBV_NEG_SMB3_ENABLED
                              SMB_VERSION                   SMB_3.0
                              SMB_SHARE_TYPE                DISK
                              SIGNING_SUPPORTED             TRUE
                              EXTENDED_SECURITY_SUPPORTED   TRUE
                              LARGE_FILE_SUPPORTED          TRUE
                              FILE_IDS_SUPPORTED            TRUE
                              DFS_SUPPORTED                 TRUE
                              MULTI_CREDIT_SUPPORTED        TRUE
                              ENCRYPTION_SUPPORTED          TRUE

--------------------------------------------------------------------------------------------------

I have seen SMB_3.0 changing to SMB_2.1 when I played a bit with the "max protocol" option in the server's smb.conf file.

Is there any option for smbstatus in the server I can use (I have tried even "smbstatus -d 20" and I just get lost) or any other tool I can install to get a similar output? I need that to check what SMB version an app is using in my Apple TV, and being not jail-broken I have no access to it.

  • 1
    run the mount command – Rui F Ribeiro Mar 18 '18 at 9:59
  • Sorry, but the mount command shows what is mounted in the system, not what is remotely mounted. I would need to run it from the Apple-TV in case, but as i wrote that's impossible. Not that it would give out the information I need about the SMB protocol version. – Michele Dall'Agata Mar 18 '18 at 10:09
  • The mount command actually helped me in this case. I'm running Ubuntu 16.04 with a SMB mount to a remote Azure Files filesystem. The mount command output a long list of values, one of them being: vers=3.0 which told me all I needed to know. SMB protocol 3.0 is in use. – KLaw May 10 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.