Can't connect to smb share after upgrade to Ubuntu Gnome 16.04

After upgrade to Ubuntu Gnome 16.04, I can no longer access my networked media tank's smb share. It's an old (2009) Popcorn Hour A-110.

When I connect to server smb://192.168.0.5 in nautilus, I get in an endless loop prompted for login resulting in an authentication failed message. I am certain that username/password are correct, because it works in Windows and I've reset it a dozen times. Note that prior to the upgrade (Ubuntu Gnome 15.10), I would not even be prompted for a username/password, it would just open in the file browser.

So I installed smbclient to see what is going on, and that gives me a hint:

smbclient //192.168.0.5/share -U nmt
Server does not support EXTENDED_SECURITY  but 'client use spnego = yes and 'client ntlmv2 auth = yes'
session setup failed: NT_STATUS_ACCESS_DENIED

That seems to suggest that the nmt server might be too old to support some security scheme that is required by the client.

How can I fix this?


This question is a duplicate of this one.

The answer: you must explicitly set

client use spnego = no

in /etc/samba/smb.conf.

If you can't find this file, execute command:

sudo apt-get install smbclient

I tried all these suggestions and nothing worked. What worked for me was the following:

sudo smbpasswd -a [username]

I do not understand why samba forgot the user, and I find it hard to believe that samba needs to be explicitly told about every single user who needs to access the linux machine from windows, but that's what did the trick, (luckily, I have only one user,) so I am letting everyone know.


I'm running ChaletOS 16.0.4.2. I did everything I could find online to get access to an external drive shared through an Asuswrt-Merlin router. NOTHING! I MEAN NOTHING WORKED!! Once I installed all of the necessary samba stuff, I still could not access my share. I kept getting the prompt to enter my password. I'd enter it correctly but got no joy. Once I made Peter de Maeyer's change in "/etc/samba/smb.conf" above, the drive opened up like blue skies after a heavy rain. Thanks Peter!!!

Since I never found all of these steps in one place, I hope this might help someone else. What finally did the trick was a combination of Peter's response and this link.

To summarize, I first created the "~/.smbcredentials" file and put the relevant info inside:
(For the unfamiliar, that little wiggly character in front of the "/" means to place the file in your "/home" folder)

username=msusername

domain=ENTER_YOUR_WINDOWS_DOMAIN

password=msusername

(The site doesn't say to add the domain, but I did so just for good measure)

I saved and closed that file and changed permissions for it by entering this in the terminal:

chmod 600 ~/.smbcredentials

Next, I edited the "/etc/fstab" file by entering this in the terminal:

sudo gedit /etc/fstab

In the "fstab" file I entered this at the bottom (make sure you use your own information here):

smb://COMPUTER_NAME/SHARED_FOLDER /media/NEW_FOLDER_NAME cifs credentials=/home/YOUR_UBUNTU_USERNAME/.smbcredentials,iocharset=utf8,sec=ntlm 0 0

I saved and closed that file and then opened the "smb.conf" file by entering this in a terminal:

sudo gedit /etc/samba/smb.conf

On Line #29 (Under "Global") I changed the "workgroup" name to match the "domain" name above. Immediately under that I created a new Line (Line #30) and entered:

client use spnego = no

Just in case, after reading this site, I thought it would be a good idea to also make this change on Line #101:

obey pam restrictions = yes to obey pam restrictions = no

After more than twenty (yes, that's 20) hours and hours of searching and borking my system several times, I finally found joy with these settings.

Good luck and may the Linux Gods be with you!