smbclient fails to get shares from Mac OS X smb server

Bug #1711212 reported by rduke15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

In Ubuntu 16.04.2 LTS, smbclient 4.3.11 cannot list shares from Mac OS X smb servers.

Windows machines can access these Mac shares, and smbclient can also get the list of shares from the Windows 7 and Windows 10 machines.

The errors are "NTLMSSP packet check failed due to short signature (0 bytes)!", "NTLMSSP NTLM2 packet check failed due to invalid signature!" and finally "NT_STATUS_ACCESS_DENIED"

    $ sudo smbclient -A ~/smb.creds -d 2 -L mac-os-x-host
    rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
    WARNING: The "syslog" option is deprecated
    added interface wlp3s0 ip=192.168.81.72 bcast=192.168.81.255 netmask=255.255.255.0
    NTLMSSP packet check failed due to short signature (0 bytes)!
    NTLMSSP NTLM2 packet check failed due to invalid signature!
    GENSEC SPNEGO: failed to verify mechListMIC: NT_STATUS_ACCESS_DENIED
    session setup failed: NT_STATUS_ACCESS_DENIED

I then tried to upgrade smbclient to the version 4.4.5 from Ubuntu 16.10, but still get the same result. The upgrade was difficult due to many dependencies, but this seems to have worked to upgrade (after downloading all these packages from the 16.10 repository:

    sudo dpkg -i Downloads/libreadline7_7.0-0ubuntu2_amd64.deb
    sudo dpkg -i Downloads/samba-common_4.4.5+dfsg-2ubuntu5_all.deb
    sudo dpkg -i Downloads/python-talloc_2.1.7-1_amd64.deb
    sudo dpkg -i Downloads/libwbclient0_4.4.5+dfsg-2ubuntu5_amd64.deb
    sudo dpkg -i Downloads/libgnutls30_3.5.3-5ubuntu1_i386.deb
    sudo dpkg -i Downloads/libgnutls30_3.5.3-5ubuntu1_amd64.deb
    sudo dpkg -i Downloads/samba-libs_4.4.5+dfsg-2ubuntu5_amd64.deb
    sudo dpkg -i Downloads/smbclient_4.4.5+dfsg-2ubuntu5_amd64.deb

    smbclient -V
        Version 4.4.5-Ubuntu

But the error messages are still exactly the same.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Can you retry with the -m option to specify other protocol versions? For example, "-m SMB2" and "-m SMB3".

Changed in samba (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for samba (Ubuntu) because there has been no activity for 60 days.]

Changed in samba (Ubuntu):
status: Incomplete → Expired
Revision history for this message
rduke15 (rduke15) wrote :

Adding -m SMB2 or -m SMB3 to the smbclient command makes no difference.

Revision history for this message
rduke15 (rduke15) wrote :

Possibly a clue: when mounting manually with mount -t cifs I need to add the nounix option:

  mount -t cifs //host/share /mnt/tmp -o username=$user,password=$pass

gives "mount ... failed: Operation not supported"

When using

  mount -t cifs //host/share /mnt/tmp -o username=$user,password=$pass,nounix

It works.

Revision history for this message
rduke15 (rduke15) wrote :

What finally worked was adding --option="ntlmssp_client:force_old_spnego = yes" to the command, as suggested here: http://samba.2283325.n4.nabble.com/ntlmssp-errors-against-El-Capitan-s-SMB-Server-tp4706666p4707237.html

This now lists shares on a Mac OSX server:

    smbclient -U$user%$password -L $mac_osx_host --option="ntlmssp_client:force_old_spnego = yes"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.