Ubuntu – Network authentication not working


I just installed Ubuntu 12.04 and Im trying to connect it to my NAS. It connects fine to folders where there are not authentication needed. However, if I try to open a password protected folder it does not connect.

I use ubuntu from long time ago, since 2008, as my sole operating system for all my PCs and all other ubuntu installations (lucid and karmic) works good with this NAS (Dlink DNS-323) always. Its just this new install for 12.04 which is not working.

For reference, I found these links with issues very similar to mine:


  1. 12.04 – Can't Connect to network shares

  2. Can't authenticate 12.04 to Active Directory Share

  3. Can't access our Buffalo Network attached storage device

This is my /etc/samba/smb.conf file:

    netbios name = pc4
    client lanman auth = yes
    server string = Samba file and print server
    workgroup = pc
    security = share
    guest ok = yes

    remote announce =
    remote browse sync =

    log file = /var/log/samba/samba.log
    max log size = 1000

    encrypt passwords = yes
    unix password sync = yes
    local master = no
    domain master = no

    os level = 33
    name resolve order = bcast wins lmhosts
    dns proxy = no

    update encrypted = yes
    hostname lookups = yes

    passwd program = /usr/bin/passwd '%u'
    passwd chat = *New*password* %n\n *ReType*new*password* %n\n *passwd*changed*\n

I tried different things long before typing this message:

  1. Install PCMan File manger as alternative to nautilus. RESULT = it didnt connect either.
  2. Install other Desktop Environments as alternative to Unity: LXDE, XFCE, GNOME Session Fallback, GNOME Desktop. RESULT: none of them worked for my authentication issue.

  3. Tried to use the default smb.conf file. RESULT: it did not work.

  4. Tried to update gvfs and componets because I read this bug:
    Regression: nautilus not mounting network share in ~/.gvfs

But after upgrading to gvfs version 1.12.1 I still have the same issue.
RESULT = it did not work either.

  1. Tried to update keyring and components by using synaptic. RESULT: same problem.

  2. I also updated all operating system with "Update Manager" up to today (april 28, 2012)

  3. After spending a lot of hours I decided to give up and ask for some help.

The only thing that did work was this command:

$ sudo mount -t smbfs -o username=NASUSER,password=****** // ~/Desktop/mountedfolder`

but thats not the way Im looking for.

Please advise.

Best Answer


After a lot of reserching and testing, I found a solution to the problem. Its a very easy workaround:

------------------ SOLUTION ------------------------
in /etc/samba/smb.conf add the following to the bottom of the [global]

client lanman auth = yes
client ntlmv2 auth = no

Look for this 2 post for the explanation of the solution:

  1. http://ubuntuforums.org/showthread.php?t=1922280

  2. https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/510059

As you can see in my question, I had the first line already and that worked for all version prior to 12.04LTS, but in this new version you MUST add the second line too which was option before.

Hope this helps!!!

It should be noted that the LANMAN Protocol is insecure and depreciated.

Related Question