6

I cannot connect to computers on my network running Ubuntu 16.04. I get stuck in a never ending username and password dialog loop forever.

I can ssh into the machine, and I can mount it in filesystem using ssh://hostname/share.

I know this question is a duplicate, but known solutions have not worked for me.

I tried adding

client use spnego = no 

to my /etc/samba/smb.conf file, just below where it says global (line 29).

That caused a different error:

Failed to retrieve share list from server. Connection timed out.

smbclient //host/share -U <username>:

NTLMSSP packet check failed due to short signature (0 bytes)!
NTLMSSP NTLM2 packet check failed due to invalid signature!
session setup failed: NT_STATUS_ACCESS_DENIED

Any ideas?

I can connect to servers on the network just fine. Right now the only issue seems to be Mac computers. (I haven't had an occasion to try to connect to a windows machine).

I'm new to Ubuntu, so I am unsure what else to try offhand.

2

I have the same problem using Xubuntu 16.04 and Mac 10.11.6. The best answer I could find Access OS X file share from Ubuntu

If using SMB then with El Capitan Apple have recently implemented a new change intended to enhance security. This involved signing all the network packets. Some SMB clients cannot cope with this feature although I would expect a Linux machine running a recent version of SAMBA4 to be able to. It may require enabling a matching option in SAMBA. It is however possible to turn this feature off on the Mac server by doing the following.

sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server SigningRequired false

and

writing the following to /etc/nsmb.conf

[default]
signing_required=no

Apple officially has a how-to article of above method here.

However, I still cannot access Mac SMB share from my linux.

Current workaround is to use AFP protocol and Netatalk according to this guide

  • Oh thank you! I just saw this response, sorry. I will try this. I recently downgraded back to 14.04 LTS. But I still have a problem connecting to Mac computers. I tried upvoting you, but I think my reputation is too low. – monniewolf Dec 28 '16 at 17:43
  • I've gone over the guide. Are you able to actually view shared folders from your Mac on your Ubuntu machine using this guide? It seems to be designed to allow you to connect to Ubuntu from your Mac. But I need the opposite. The Mac computer is my advisor's machine. It hosts files I need to be able to pull over onto my Unix machine, and ssh is just painfully slow for such large files over our network. I may need to try to get physical access to the Mac I am trying to connect to (I currently do not have that) as it seems I may need to adjust some settings there as well). – monniewolf Dec 28 '16 at 18:51
  • 1
    So I have not updated this in a while, so I apologize. But yes, connecting to the Mac computer via afp:// and either hostname.domain or IP address works great. I do not use Netatalk. Once connected via AFP, I just directly navigate to the connected drives that I need. – monniewolf Aug 17 '17 at 20:05
2

I found the working solution from Apple discussion (which involves mounting with specific option)

The key is the "nounix,sec=ntlmssp" options

So, I have to mount with

sudo mount.cifs //mac.server.address.ofcomputer /mnt/Mac -o nounix,sec=ntlmssp,username=myusername
  • 1
    I get a "mount error(22): Invalid argument So I need to explore this more. In the meantime, connecting via AFP still works great. – monniewolf Aug 17 '17 at 20:12
2

For smbclient, you may need --option="ntlmssp_client:force_old_spnego = yes" as suggested on the samba-technical mailing list.

This now lists shares on a Mac OSX server:

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

For mounting, you may need to add the nounix,sec=ntlmssp options as already suggested here.

I didn't need to change any configuration on the Mac OS X side.

1

Same problem on 16.04, could not connect to my mac anymore using smb. (before I could, but I don't know the changes which it made fail).

Solution for me is to use afp instead of smb: In Nautilus (file manager) go to File > Connect to server.

Server address:

afp://[nameofyourmac].local

or

afp://[ip address of your mac]
1

On Mac: System Preferences->Sharing->Option:

  • Select “Share files and folders using SMB.”
  • Choose your user in the "Windows File Sharing List".

See https://support.apple.com/en-au/guide/mac-help/mchlp1657/10.15/mac/10.15.

Don't know why, but it works for me with macOS Catalina and Ubuntu 18.04.

  • Thanks. This is all I needed. – devloper Oct 22 '20 at 3:42
0

So Ubuntu supports Apple File Protocol in both 14.04 and 16.04.

I have no idea why I never found this when searching for an answer. I happed to try it just to see, and it worked. I can now easily connect via "Connect to server" using afp://serveraddress.ofmac.

You can also use mount.cifs to mount the Mac to a mount point that you specify.

I made a mount point in /mnt/, let's call it Mac for this example:

sudo mkdir /mnt/Mac
sudo mount.cifs //mac.server.address.ofcomputer /mnt/Mac -o username=<yourusername>

Update

AFP file sharing is not compatible with the new APFS file system that was released with Mac OS High Sierra. Per Apple, you'll need to use SMB in order to share files from an APFS volume.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.