Gvfs keeps asking for password when trying to mount Samba share

Bug #510059 reported by eddified on 2010-01-20
This bug affects 68 people
Affects Status Importance Assigned to Milestone
gvfs (Ubuntu)
Declined for Lucid by Sebastien Bacher
Declined for Maverick by Sebastien Bacher

Bug Description

Binary package hint: nautilus

My Ubuntu Desktop (9.10, 64-bit) VM can't connect to my Windows 7 (64-bit, Ultimate) File Share using Nautilus. I enter "smb://<comuterName>" in the address bar and then it comes up with a password dialog (see screenshot) and then after entering the correct login info, the dialog disappears for a second or two but then reappears again. The dialog always comes back up and the share is never mounted.

    * Connecting from an XP box on the network to the windows 7 share works just fine.
    * Connecting from the Ubuntu machine to the windows 7 share using the appropriate 'smbmount' command works just fine.
    * Connecting from the Ubuntu machine (using the nautilus GUI) to the XP box (password protected) works just fine.
    * Then I turned off password protection in Win7, rebooted the win7 machine, and still all of the above tests turned out the same. And the Ubuntu machine still doesn't connect to the windows share using the nautilus GUI, and still displays the password dialog even though no password is required anymore.
    * I tried using smbclient to view the shares, here is the output (not sure if I should be trying something else using the smbclient program):
          o eddie@eddie-ubuntu:~$ smbclient -L eddie-win7
            Enter eddie's password:
            session setup failed: SUCCESS - 0

ProblemType: Bug
Architecture: amd64
Date: Sun Jan 17 15:41:28 2010
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/nautilus
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
Package: nautilus 1:2.28.1-0ubuntu3
ProcVersionSignature: Ubuntu 2.6.31-17.54-server
SourcePackage: nautilus
Uname: Linux 2.6.31-17-server x86_64

eddified (eddie-bishop) wrote :
eddified (eddie-bishop) wrote :

Screenshot attached.

Pedro Villavicencio (pedro) wrote :

gvfs-mount location works fine?

Changed in nautilus (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
eddified (eddie-bishop) wrote :

These work:
sudo mount -t cifs '\\\code' /home/eddie/code -o username=eddie,password=password
sudo smbmount '\\\code' /home/eddie/code -o username=eddie,password=password

So does this line in /etc/fstab:
// /home/eddie/code smbfs username=eddie,password=password,uid=eddie,gid=eddie 0 0

However, gvfs-mount doesn't. It keeps asking for my password over and over, even when the share is setup to not use a password.

eddie@eddie-ubuntu:~$ gvfs-mount 'smb://'
Password required for share code on
User [eddie]:
Password required for share code on
User [eddie]:
Password required for share code on
User [eddie]:

Pedro Villavicencio (pedro) wrote :

gvfs issue then, moving it.

affects: nautilus (Ubuntu) → gvfs (Ubuntu)
Changed in gvfs (Ubuntu):
status: Incomplete → New
FakeJake93 (jkt-1215) wrote :

I'm having the same sort of problem. I'm relatively new to Linux; I just downloaded Ubuntu 9.10 about a week ago and moved from Windows XP.

I have a wireless network I was able to connect to just fine elsewhere; I just went into the file manager; clicked Network; Windows Network; and was able to access the files. However, on my home network, I am trying to connect to my old XP computer (file sharing is already enabled on it), and Ubuntu is able to find the Windows Network. When I open it and see "DarkShadow1215" (the name of the computer), clicking on it gives me the password prompt, and everytime I type in my Ubuntu password, it goes away and returns a few seconds later. I've tried everything, from ubuntu-username/ubuntu-password, windows-username/windows-password, ubuntu-computer-name/ubuntu-username/ubuntu-password, windows-computer-name/windows-username/windows-password, and then just the passwords by themselves. There is no error message, no anything. Just the prompt constantly returning as if I haven't entered in the correct password. The windows computers are able to share with each other, it just seems that my ubuntu netbook does not want to connect.

summary: - win7 file share won't mount using nautilus
+ Gvfs keeps asking for password when trying to mount Samba share
Stephen Cradock (s-cradock) wrote :

Well, I hope that this is now correctly identified as a gvfs problem; it has been most disheartening to see it pushed aside repeatedly and always rated as low importance (see the original bug report, #490201 - not a samba bug, must be nautilus, send it upstream, gnome accepts it as one of three hundred low-importance nautilus bugs, so it disappears into a heap of stuff that will never be fixed.)

All the symptoms are clear and reproducible, so when can we have this fixed? It is NOT of low importance - if you are using networking between computers this is a clear and compelling reason not to use Ubuntu.........

bozackt (bozackt) wrote :

I agree with Stephen. This is *not* a low importance bug. Things like this are exactly what keeps Linux/Ubuntu from being widely adopted. Linux needs to play effortless with Windows, but this is a show stopper. It needs to be fixed.

FakeJake93 (jkt-1215) wrote :

Well, I completely agree with Stephen and bozackt here.

I never ended up getting around the bug, so I resorted to fairying files over with a four gigabyte SD card. It wasn't all that painful, but not nearly as painless as dragging the files over the network. >_>

Marco Rodrigues (gothicx) wrote :

I got this problem on 9.10 and still the same at 10.4 LTS, so this should be fixed asap.

It mounts fine with 'sudo mount -t cifs // /home/kmos/x -o username=kmos'

Changed in gvfs (Ubuntu):
status: New → Confirmed

Same problem here, and this should have a higher importance.

Also, encountering the same problem with samba shares between Ubuntu only computers(no windows involved).

I agree with Stephen and boxackt. This is an extremely (to say the least) annoying bug, and should not be of low importance.

Marco, I tried your fix and it didn't work for me... no idea why.

As a side note, perhaps this does not have anything to do with the discussion, but I am unable to access the same server using RDC through Terminal Server Client. Although this is a different bug, it seems related because it does not accept my username and password.

Another theory I have is that usernames with spaces trigger this bug - did any of you access your shares with Windows usernames containing spaces?

Sebastien Bacher (seb128) wrote :

The issue is an upstream one and it would be nice if somebody having it could send the bug the to the people writting the software (https://wiki.ubuntu.com/Bugs/Upstream/GNOME)

Richard Garvin (garvinrick4) wrote :

This is what we used at one time to fix this problem.
Easy enough to try.

gksudo gedit /etc/samba/smb.conf

Find this section in the file:
####### Authentication #######
# “security = user” is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
# in the samba-doc package for details.
#security = user

Uncomment the security line, and add another line to make it look like this:
security = user
username map = /etc/samba/smbusers

Richard Garvin (garvinrick4) wrote :

All Windows machines have to have log-in password for workgroup to

Marco Rodrigues (gothicx) wrote :

I remember this bug didn't happen at Ubuntu 9.04 (Jaunty). So this is a regression..

Changed in gvfs:
status: Unknown → New
Nythain (nythain) wrote :

Still haven't found a fix for this problem, and its "low" priority is convincing me to distributions. You know the greatest fix for this I've found so far, run an effing windows xp or 7 install in a virtual machine. This is ridiculous.

Changed in gvfs (Ubuntu):
status: Confirmed → Triaged
Changed in gvfs (Ubuntu):
importance: Low → Medium
tgra (thomas-grande) wrote :

The same issue here! Do anybody have a fix?

best regards

James Pakko (james-pakko) wrote :

I had this problem and this is what fixed it for me:

in the [global] section of /etc/samba/smb.conf put in these lines:
   name resolve order = lmhosts bcast host wins
   lanman auth = yes
   client lanman auth = yes
   client plaintext auth = yes

Good luck!

Marco Rodrigues (gothicx) wrote :

It didn't worked for me :/

Xenomorph (xenomorph) wrote :

This doesn't work in 9.10, 10.04, or 10.10.

How could this slip by testers? No one uses Windows?

eddified (eddie-bishop) wrote :

@Xenomorph: Either that, or the ones that do use windows (like me) give up on Linux and move back to Windows. Don't worry, I try linux again every few couple of years, I haven't completely given up on it. :)

Changed in gvfs:
importance: Unknown → Medium
George DeKatt (georgedekatt) wrote :

This has not worked from 9.04 to 10.10
I have to resort to mounting the share in /etc/fstab

Linux sandbox 2.6.35-23-generic #36-Ubuntu SMP Tue Oct 26 17:03:18 UTC 2010 i686 GNU/Linux

Juris (jurispv) wrote :

I've tried everything but the thing that worked for me was setting correct hostname in /etc/hostname and /etc/hosts. Mounting works like a charm after reboot.

I have the same annoying problem on 9.10

Karl Kropf (ksk-clara) wrote :

For what it's worth, I experienced this problem trying to set up a two-way share with a Windows 7 machine. I'm running Ubuntu Studio 10.04. I installed samba (via the Software Centre) and could see the machine in Places>Network but all I could see when double clicking on the icon for the machine was ADMIN$ and C$. Double clicking on either of these brought up the password pop-up and the attendant problems above. To cut a longish story short, I went here:


and found out that the standard 'Software Centre' install of samba (on my machine) did not include 'nautilus-share' (I had no trouble getting access to the machine from the Windows client). I installed nautilus-share and tried again. This time opening the machine on Places>Network I could see ADMIN$, C$ and Users. Double clicking on the Users folder brings up the password pop-up which works fine - I have access to that directory and all its contents (even though some have the lock icon. Trying to open either of the other directories does not work, however (same problem). One quirk is that the pop-up comes up twice, even if you cancel.

Hope this is of some use.

Mårten Woxberg (maxmc) wrote :

I just installed the desktop version of Ubuntu 11.10 on my 2nd computer.

Right after the install I tried to access the samba shares (my main purpouse for installing ubuntu).
I have two computers who share and both of them was listed as computers in Nautilus.
Nautilus did not however list my router with USB that also shares through samba.

One of the machines runs Openelec (linux dist) and I could access that by doubleclicking it and I saw it's shared folders.
I could also navigate into windows shares but I could not access my workgroup there.

So I upgraded all of the packets after installation (245) and now after reboot it asks me for password every time I try to access the workgroup. It works fine if I actually write the path to the machine and the folder, no problems no password. But if I want to list it then I have the same problem as everyone else.
Also now the only machine I could access the shares from asks for SSH-login instead in nautilus...
As you can see from my smb.conf I have tried alot of the things in this thread and it won't work.

mawox@woxnet-nas:/etc/samba$ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
 workgroup = WOXNET
 server string = %h server (Samba, Ubuntu)
 map to guest = Bad User
 obey pam restrictions = Yes
 pam password change = Yes
 passwd program = /usr/bin/passwd %u
 passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
 username map = /etc/samba/smbusers
 unix password sync = Yes
 lanman auth = Yes
 client lanman auth = Yes
 client plaintext auth = Yes
 syslog = 0
 log file = /var/log/samba/log.%m
 max log size = 1000
 name resolve order = lmhosts host wins bcast
 dns proxy = No
 wins server =
 usershare allow guests = Yes
 panic action = /usr/share/samba/panic-action %d

 comment = All Printers
 path = /var/spool/samba
 create mask = 0700
 printable = Yes
 browseable = No

 comment = Printer Drivers
 path = /var/lib/samba/printers

Thomas M Steenholdt (tmus) wrote :

I have this exact problem on a freshly installed Precise.

This is what I had to do, to fix the problem:

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

client lanman auth = yes
client ntlmv2 auth = no

I could gvfs-mount a Windows 2008 share, but not an Alfresco CIFS share. With the above changes to smb.conf, I can access all shares withoput problems.

I didn't have this problem on a freshly installed Oneiric machine, so I'm not sure what's changed og wether thes should be fixed in gvfs or in the default samba installation.

Alexandre Jodoin (cacalex) wrote :

12.04 here...

This issue is still present...
Let me know if you need more info...

auth.log doesn't show errors...

Matthew Meyer (osarusan) wrote :

Same problem here... good grief how long has this been going on with no solution?

I tried each of the fixes listed above, but none of them worked for me. I have to agree with the above sentiments that this is exactly the type of thing that causes people to give up on Ubuntu and stick with Windows permanently. This bug was submitted over 2 years ago, and people are still asking for a solution...

Ulf Tidstrand (ulf-tidstrand) wrote :

The solution in comment #29 worked for me in 12.04. However, one of my accounts still had problems (while other accounts on the same machine worked OK). It turned out that there was a local smb.conf file in the .smb directory of the account's home directory. I simply removed the entire .smb directory and then the global settings in /etc/samba/smb.conf had effect.

I guess you can enter the settings in comment #29 to the local file as well, but I have not tried that...

bnw (1i1g6) wrote :

The solution in #29 fixed it for my 12.04 as well.

icb410 (ian-berke) wrote :

Solution in #29 fixed it for me. I already had the client lanman auth = yes from 11.10 to get it to work. It was the ntlmv2 line that was needed for 12.04. I am connecting to a netgear Nv+ NAS.

Nhorning (neilhorning) wrote :

Medium is not high enough priority for this bug. If the solution in #29 works for everybody, can't it be fixed downstream by adjusting the default settings for smb.conf? It's great that there's a fix, but asking users in a remote location to modify this setting on each one of their machines is obviously not ideal.

The deprecated LanMan authentication is not safe at all. That for it is just a bad workaround to set
client lanman auth = yes
client ntlmv2 auth = no
I hope there will soon be an other solution for this problem!

Jorma (jtl) wrote :

I have two 12.04 machines, one of which was not able to connect to a shared folder in the other.

The problem was solved when on the server side I added myself as one of the users of Samba
(I of course already had a user account on the server):

smbpasswd -a myUsername

I also gave the password that I already was using.

There was no need to restart:

service smb restart

The connection started to work in a minute or two.

More information: http://www.cyberciti.biz/faq/adding-a-user-to-a-samba-smb-share/


rhhoek (r-h-hoek) wrote :

With changing (adding) /etc/samba/smb.conf to:

client lanman auth = no
client ntlmv2 auth = no
client ntlm = yes

this works for me, like work around #29

Nicolas Krzywinski (nsk7even) wrote :

Hi guys, for me only this line helped:
client ntlmv2 auth = no

The SMB server I am accessing is an old NAS which don't support NTLMv2. We had the same issues on all Windows 7 and Windows Server 2008 machines when trying to access the NAS, because the next gen windows systems have NTLMv1 disabled by default.

So the problem seems to be that gvfs in Ubuntu 12.04 does not try other authentication mechanisms if NTLMv2 is enabled!?

For now this workaround to disable NTLMv2 is no problem, because of the lack of any important NTLMv2 share. But gvfs has to support access to heterogenous samba network environments!

asheenlevrai (asheenlevrai) wrote :


Running Ubuntu 13.04 here and experiencing the same issue.
gvfs can connect flawlessly to shares supporting NTLMv2 but cannot connect to shares supporting NTLM only

The same behavior is observed in Win7 and OSX 10.7 but there are settings that can be modified to add back support for NTLM authentication.

asheenlevrai (asheenlevrai) wrote :

Solved problem using this:

Edit /etc/samba/smb.conf

add the following in the [global] section

client ntlm auth = yes
client ntlmv2 auth= no

Using Xubuntu 14.04 and none of the proposed workarounds work for me. Very frustrating.

At least with a one-way share (Win7 to Linux works even if Linux to Win7 doesn't) I can transfer files without a sneakernet.

I have not been able to get this to work in prior attempts in the last month with Mint (Petra) Xfce, Ubuntu 13.10, Ubuntu 14.04 and now the latest Xubuntu. I've switched distributions to attempt to get this working.

Xubuntu 14.04. Confirming problem with gvfs. Gigolo keeps prompting for username, domain and password. The same happens with gvfs-mount in the terminal.

I am able to mount the folder with cifs:
sudo mount -t cifs //xxx/xxx newfolder/ -o username="myusername",domain="mydomain",sec=ntlmssp,noperm

This problem is not present in Ubuntu 14.04 nor is it present in Linux Mint Qiana 17 XFCE. Anyone who has solved this problem in Xubuntu 14.04?

Børge Lillebo (lille1982) wrote :

Addendum: I have now discovered something interesting enlightening this problem. When I try Linux Mint 17 XFCE from usb (without installing to computer) I am able to mount smb inside Thunar (smb://XXX.XXX.XX/XXX). I just have to write username, domain and password once. When I install the same system to the same computer the username-domain-password prompt keeps reappering without mounting the folder.

freacert (erik-grtz) wrote :

some note of my side.

Problem started when i tried to connect to a Samba4 machine (ubuntu 14.04.1) from a 12.04. I had the password loop on the 14.04. to try and reach the 12.04 (samba 3.6.3-2).
So I thought, I update the 12.04 with samba4. Now I have the password loop on that machine aswell. Keeps on asking for a password.

Uninstalled and purged samba. Reinstalled samba 3.6.3-2 , all to no avail.
Now I dont have samba installed, and trying to reach a network share from "Connect to Server" it still doesnot accept my password.

Looking at the samba.cfg file on the nas, running Alt-F (http://sourceforge.net/projects/alt-f) i only find a file where the shares are defined.

Desperate to solve this VERY annoying problem.

Changed in gvfs:
status: New → Confirmed
Changed in gvfs:
status: Confirmed → Incomplete
Changed in gvfs:
status: Incomplete → Unknown
Nikola (nikolagotovac) wrote :

Same here... I have started with 14.04LTS and I could reach a Win2008 machine. After several updates, somewhere in the first quarter of 2016, I believe something things got strange. I purged samba and reinstalled it - no change.

I have several personal shared folders, made from nautilus, and all Win machines can reach them (as guest user).

However, I can not reach a Win2008 server or other Win7 - shared folder. Both gvfs-mount and nautilus dialogue keep asking for password/domain again and again.

Setting aforementioned combinations such as:
client lanman auth = no
client ntlmv2 auth = no
client ntlm = yes
.. does not help.

So I have browsed the old /etc/samba/ and have found several older smb.conf files:
-rw-r--r-- 1 root root 9542 Mar 1 2015 smb.conf.old.gadmin-samba-0.3.2
-rw-r--r-- 1 root root 9542 Jun 11 2015 smb.conf.ucf-dist
Basically, these two old were from time when everything was ok, and guess what, after I have copied them in smb.conf, nautilus and gvfs-mount still were not working (and keep asking for password/domain).

There you have it. It is not a thing in smb.conf, but (my best guess) the bug is probably in gvfs-mont.

Nikola (nikolagotovac) wrote :

After some browsing it turns out this is not really a bug, but shall we say a "security feature".

There is this pklocalauthority stuff (see man page) that basically makes authorization things more complex, and to me, not logical. See ralph.ronnquist comment at Debian user forums page http://forums.debian.net/viewtopic.php?f=5&t=128280

Therefore, it turns out the nautilus/gvfs-mount needs your password, but not for remote system. It wants your password for LOCAL system... that worked for me, no matter how strange it is. I mean, the nautilus clearly states it needs a username/password for remote system?

moobulus (mizzle) wrote :

I am having the same problem and after blowing nearly 400 dollars of my allowance on networking gear and bankrupting myself in the process only to find out that linux is a turd when it comes to file sharing is really ticking me off!

Fuck linux it's a bullshit os for wieners!

Fix this shit already!

theozzlives (theozzlives) wrote :

I am having the same problem and after blowing nearly 400 dollars of my allowance on networking gear and bankrupting myself in the process only to find out that linux is a turd when it comes to file sharing is really ticking me off!

Fuck linux it's a bullshit os for wieners!

Fix this shit already!
  WOW Dude! This post is so ancient! Anyhow I fixed this problem many years ago. My issue is the passwords on Ubuntu and Windows 7 did not match. Once I corrected that issue, everything worked fine. Sorry you are so pissed off with Linux but I still use it and connect fine to Windows 10. If you have a router and Ethernet cables, you shouldn't have had to spend all that money on hardware. You also have to make sure thw Workgroup name is the same.

Marc Pignat (swid) wrote :

Dear all,

Using ubuntu 16.04, and adding

security = user
client use spnego = no

to /etc/samba/smb.conf has fixed gvfs-mount for me

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.