Thibault Roulet
2022-Apr-06 12:33 UTC
[Samba] how to know SMB protocol versions supported by a host
Hi, Under linux you can run something like this: nmap -p139 --script smb-protocols <server-address> it will report something like: PORT??? STATE SERVICE 139/tcp open? netbios-ssn Host script results: | smb-protocols: |?? dialects: |???? 2.0.2 |???? 2.1 |???? 3.0 |???? 3.0.2 |_??? 3.1.1 Cheers. On 4/6/22 11:32, Piviul via samba wrote:> I have a little problem using samba; I have a bash script that should > mount some LAN hosts shares. Some of these hosts support only SMB1 > protocol. If I try to mount a share on a host that support only SMB1 > without specifying the protocol to use or specifying SMB3 or SMB2 the > mount command seems to freeze; if I specify on the options vers=1 all > seems to works. > > There is a way to know the SMB protocol version supported by a host? > > Piviul > >-- Thibault Roulet
Piviul
2022-Apr-07 07:33 UTC
[Samba] how to know SMB protocol versions supported by a host
On 06/04/22 14:33, Thibault Roulet via samba wrote:> Hi, > > Under linux you can run something like this: > > nmap -p139 --script smb-protocols <server-address> > > it will report something like: > > PORT??? STATE SERVICE > 139/tcp open? netbios-ssn > > Host script results: > | smb-protocols: > |?? dialects: > |???? 2.0.2 > |???? 2.1 > |???? 3.0 > |???? 3.0.2 > |_??? 3.1.1Great Thibault, but not here :(> $ nmap -p139 --script smb-protocols 192.168.64.2 > > Starting Nmap 7.40 ( https://nmap.org ) at 2022-04-07 09:27 CEST > NSE: failed to initialize the script engine: > /usr/bin/../share/nmap/nse_main.lua:816: 'smb-protocols' did not match > a category, filename, or directory > stack traceback: > ?? ?[C]: in function 'error' > ?? ?/usr/bin/../share/nmap/nse_main.lua:816: in local 'get_chosen_scripts' > ?? ?/usr/bin/../share/nmap/nse_main.lua:1271: in main chunk > ?? ?[C]: in ? > > QUITTING!it's an old server that should connect to? some cifs hosts in the best way. Have you another suggestion? Piviul