9

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?

4 Answers4

12

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
4

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.

1

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!

0

Tried these answers but still can not connect to my Windows shares. I can connect from my Windows PCs to my Ubuntu share but not the other way around. Using 16.04.

Update/Edit:

Well, after performing many different things including re-installing Ubuntu and editing the SMB.CONF file I figured out how to fix my issue.

I wiped my laptop clean and installed Fedora 24 Workstation and noticed the same results--HMMMM I said.

And then I realized that most of the computers I was trying to connect to had usernames, of course, but blank passwords. I tried as SMB.CONF edit that someone had mentioned to allow the use of blank passwords but was not able to get that to work. And, as needed, I would always re-start my smbd and nmbd after changes.

Anyway, I did have one computer on the network that has a username and password. Guess what--from Fedora I was able to connect! Then I entered passwords on the other computers and presto, was able to finally connect to them from Fedora.

Now, since the goal is to use Ubuntu I again wiped my laptop clean but this time again did a fresh install of Ubuntu workstation. I made two very minor changes to the SMB.CONF file (made these also on the Fedora install) to set the workgroup name properly and the netbios name properly. Just left everything else default.

Next, shared a folder on the Ubuntu machine. Simply used the GUI to share the folder out (did not modify the SMB.CONF) and set it to allow guest access. Now, every PC on my network can connect to the share on my Ubuntu machine. If I want to place tighter controls on who can and can't access that share I can make changes in my SMB.CONF.

But now, to the best part--now I can connect from my Ubuntu laptop to any of other computers and shares on my network.

The solution to my problem, which may or may not help others, is that those devices I could not connect to had accounts without passwords. Once passwords were assigned all worked.

Hope this can help someone!

Thanks,

Rich Huelbig