2

Using Ubuntu 16.04 and samba version 2:4.3.11+dfsg-0ubuntu0.16.04.1.

I have shared a folder using Nautilus, but I can't connect to it either though Nautilus or through smbclient. Nautilus repeatedly asks for authentication, while smbclient returns:

tree connect failed: NT_STATUS_ACCESS_DENIED

I tried adding client use spnego = no to /etc/samba/smb.conf as mentioned here, but this only changes the error to:

session setup failed: NT_STATUS_INVALID_PARAMETER

If I allow guest access to the folder, everything works correctly.

Any ideas?

1 Answers1

3

Found the answer.

Samba doesn't use the normal Ubuntu user credentials for authentication. It uses its own credentials database.


To add a user to the Samba credentials database, execute:

sudo smbpasswd -a USERNAME

Where USERNAME is your Ubuntu username. Then, after entering the sudo password, enter your Ubuntu password twice. Do this for every user, then Samba will work.


This can also be done graphically by installing and using system-config-samba.

However system-config-samba doesn't start because the file /etc/libuser.conf is missing. You need to create it first (an empty file will do):

sudo touch /etc/libuser.conf

Canonical and Ubuntu Developers: this is not user friendly!