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:
LINKS:
-
12.04 - Can't Connect to network shares
- http://www.ubuntuforums.org/showthread.php?p=11842051
-
Can't authenticate 12.04 to Active Directory Share
- http://www.linux-archive.org/ubuntu-user/660199-cant-authenticate-12-04-active-directory-share.html
-
Can't access our Buffalo Network attached storage device
- http://www.askubuntu.com/questions/126588/cant-access-our-buffalo-network-attached-storage-device
This is my /etc/samba/smb.conf file:
[global]
netbios name = pc4
client lanman auth = yes
server string = Samba file and print server
workgroup = pc
security = share
guest ok = yes
remote announce = 192.168.1.255
remote browse sync = 192.168.1.255
log file = /var/log/samba/samba.log
max log size = 1000
encrypt passwords = yes
unix password sync = yes
socket options = SO_KEEPALIVE SO_BROADCAST TCP_NODELAY
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:
- Install PCMan File manger as alternative to nautilus. RESULT = it didnt connect either.
Install other Desktop Environments as alternative to Unity: LXDE, XFCE, GNOME Session Fallback, GNOME Desktop. RESULT: none of them worked for my authentication issue.
Tried to use the default smb.conf file. RESULT: it did not work.
- Tried to update gvfs and componets because I read this bug:
Regression: nautilus not mounting network share in ~/.gvfs
- https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/945399
But after upgrading to gvfs version 1.12.1 I still have the same issue. RESULT = it did not work either.
Tried to update keyring and components by using synaptic. RESULT: same problem.
I also updated all operating system with "Update Manager" up to today (april 28, 2012)
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=****** //192.168.1.100/Volume_1 ~/Desktop/mountedfolder`
but thats not the way Im looking for.
Please advise.
SOLUTION
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]
section:
client lanman auth = yes
client ntlmv2 auth = no
-------------------------------------------------------
Look for this 2 post for the explanation of the solution:
http://ubuntuforums.org/showthread.php?t=1922280
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.