LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Samba version/dialect used for mounts. (https://www.linuxquestions.org/questions/linux-software-2/samba-version-dialect-used-for-mounts-4175504140/)

cele_82 05-06-2014 07:45 PM

Samba version/dialect used for mounts.
 
Hi,
is there a command in linux to get information about which SAMBA dialect has been used for a mount ?

the smbstatus command doesn't do that. or the mount command.


For instance in Windows 7 you need to use Wireshark, and Windows 8 has a PowerShell tool for it... but I was wondering if Linux has something like Mac(Darwin) has to get the samba version used.

Code:

macbook:~ username$ smbutil statshares -a

==================================================================================================
SHARE                        ATTRIBUTE TYPE                VALUE
==================================================================================================
c$                           
                              SERVER_NAME                  192.168.1.20
                              USER_ID                      600
                              SMB_NEGOTIATE                AUTO_NEGOTIATE
                              SMB_VERSION                  SMB_2.1
                              SMB_SHARE_TYPE                DISK
                              SIGNING_SUPPORTED            TRUE
                              EXTENDED_SECURITY_SUPPORTED  TRUE
                              LARGE_FILE_SUPPORTED          TRUE
                              FILE_IDS_SUPPORTED            TRUE
                              DFS_SUPPORTED                TRUE
                              FILE_LEASING_SUPPORTED        TRUE
                              MULTI_CREDIT_SUPPORTED        TRUE


Doc CPU 05-07-2014 04:42 AM

Hi there,

Quote:

Originally Posted by cele_82 (Post 5166019)
is there a command in linux to get information about which SAMBA dialect has been used for a mount ?

what do you mean by "which Samba dialect"? Are there multiple of them??

Quote:

Originally Posted by cele_82 (Post 5166019)
the smbstatus command doesn't do that. or the mount command.

What do you want to know, specifically?

Quote:

Originally Posted by cele_82 (Post 5166019)
For instance in Windows 7 you need to use Wireshark, and Windows 8 has a PowerShell tool for it...

For what? Wireshark is the multi-purpose power tool (some call it a weapen) to dig up just about anything that's going on on the network; don't know about Windows 8. But I still wonder what it is that you need to know.

Quote:

Originally Posted by cele_82 (Post 5166019)
but I was wondering if Linux has something like Mac(Darwin) has to get the samba version used.

Not really. Frequently, it's given in the server's identification string. But it's meaningless anyway. Samba uses a standard network protocol that is compatible with both ends (client and server) of Windows' file sharing. For all I know, there is no need to know the Samba version anywhere. Just connect to a share (using the mount option "-t cifs" on Linux, using the "Map Network Drive" on Windows Explorer or the "net use" command at the command line), give the required credentials and you're done. Very similar from Mac OS, I guess, as this is a Unixoid system like Linux.

[X] Doc CPU

cele_82 05-07-2014 05:34 AM

Depending on the server, the samba version(dialect) used is auto-negotiated.

If my Linux client support SMB2.1 mounts but the server is only SMB1.0 I get anSMB1.0 mount.


I want a tool telling me what SMB version(dialect) is in use for that.



Wireshark can be used to sniff the SMB traffic and get this info out of packet capture



But there's a tool in OSX(showed on the #1 post) and Windows 8 has also now a PowerShell Tool for it.
Code:

Windows PowerShell

PS C:\> Get-SmbConnection

ServerName          ShareName          UserName            Credential          Dialect            NumOpens
----------          ---------          --------            ----------          -------            --------
Contoso-FS1        VMS5                Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00                1
Contoso-FS1        VMS5                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                3
Contoso-FS          VMS1                Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00                1
Contoso-FS          VMS1                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                5
Contoso-SO          VMS3                Contoso\Contoso-HV1$ Contoso\Contoso-HV1$ 3.00                1
Contoso-SO          VMS3                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                1
Contoso-SO          VMS3                NT VIRTUAL MACHI...  Contoso\Contoso-HV1$ 3.00                2


So wondering if there's one in Linux as well ? I couldn't find it.


All times are GMT -5. The time now is 04:50 AM.