Sign in with
Sign up | Sign in
Your question
Solved

Windows 7 linux file share problem

Last response: in Linux/Free BSD
Share
October 11, 2009 5:47:22 PM

I am having trouble accessing shared files on my windows 7 machine from my linux box (ubuntu 9.04).

I have set up a file to be shared on windows 7, force 128 encryption is turned off, firewall is turned off, username not required (although i have set up a account specific for sharing to make sure this isn't the problem) and permissions are set up.

However, i cannot access this file on my linux box.

I have attempted to access this file by clicking "Places > Connect to Server", select Windows Share, entered my computer name OR ip address for the windows 7 computer for the server field, and tried typing in the folder name that is shared on the folder field.

When i hit ok it brings up a screen that asks for a username and password. I have tried everything here i can think of, the specific sharing account that i made, an administrator account, and no account, but none of them are working. It just brings me back to the username, domain, password box again.

Any ideas on why this is happening? I think it is a windows 7 specific problem (i have seen others with the same problem who claimed that it worked just fine on xp/vista but not on win7) but i will test this tomorrow on a windows server 2003 machine and verify this.
October 12, 2009 10:15:49 PM

update: Via the same procedure it will connect fine to files shared on Windows Server 2003, so im pretty sure that makes it a Windows 7 thing. I heard something about being able to use smbfs to set a filesharing system up, so i'm going to take a look at that.

However if someone has any way to get this working on the windows 7 machine like it does on the server 2003 machine i would love to hear it. I am wondering if perhaps it could be because the windows 7 machine is not part of a domain, instead it is just the default workgroup? Thoughts?

Thanks
m
0
l

Best solution

October 22, 2009 9:42:47 AM

Well first, smbfs is the older Samba client implementation of SMB; it's now deprecated, you should use cifs (that alone may actually solve your problem if you set up your network mounts in /etc/fstab).

There must be data available from the Samba project about getting data from a Windows 7 share, or why you can't mount it from your Linux box.
Share
Related resources
October 22, 2009 4:37:10 PM

Awesome thanks for the advice. Ill will work on it tonight and get back to you.

Cheers
m
0
l
Anonymous
a b $ Windows 7
October 25, 2009 1:45:25 PM

I am having virtually the same problem but with a Kingwin media player that has an embedded Linux OS so I can't change anything on that device. I have tried changing the local security policy to respond to NTLM responses and turned off 128 bit encryption. No luck on that. I have no problem accessing these shares from Windows xp and vista and don't everything you mentioned in your post. Please let me know if you have any luck with this. I haven't found a fix yet but will let you know if I figure it out.
Thanks
Nuker
m
0
l
a b 5 Linux
October 25, 2009 3:58:13 PM

Are you sure there is not a firmware update for the Kingwin?
m
0
l
October 26, 2009 10:26:56 PM

Disclaimer: I am not really knowledgeable about SAMBA.

Anyway, here goes: I read that one should upgrade to 3.3.8+ or 3.4.1+ to being able to access SAMBA (CIFS) shares from Win 7. Maybe there is also an issue when trying to go in the opposite direction as the OP. Upgrading seems worth a try...
m
0
l
Anonymous
a b $ Windows 7
October 27, 2009 2:04:39 AM

No firmware updates available on my box from Kingwin. At least not that I could find on their website. I'll have to fire up my Linux server to see if I have the same problem with that as I do the media player.
Thanks all,
m
0
l
October 28, 2009 4:02:09 AM

I'm defenatally making progress using cifs instead of smbfs.

using the command:
"sudo mount -t cifs //ipaddress/sharefolder ~/Share/ -o username=username,password=password,iocharset=utf8,file_mode=0777,dir_mode=0777
I am able to connect to the shared files on my windows 7 machine :)  YAY!

The one problem i am having now is that my linux machine isn't able to resolve the windows net bios name. It cannot ping it, but when i use the ip address it works fine. Any more brilliant ideas on how to resolve this? If I can't resolve it then it isn't a huge deal, i can just force the ip address on this computer, however if there is a way to solve this i would love to here about it.

thanks for the advice mitch074 :) 
m
0
l
October 28, 2009 5:14:35 AM

ha!

Modified the nsswitch and we are all good now! Thanks for the help :) 
m
0
l
October 28, 2009 8:43:31 PM

ok one more question. I have permissions set up for the shared files in win7 to full access for everyone, but when i access them from my linux machine i only have read access. Thoughts?
m
0
l
October 29, 2009 12:42:26 AM

first: you may need to add the 'rw' parameter to your options - if memory serves me, mounts are done in Read Only mode by default.

mount -t cifs //ipaddress/sharefolder ~/Share/ -o username=username,password=password,iocharset=utf8,file_mode=0777,dir_mode=0777,rw

I don't recommend setting everything on the share as 'executable' though: read/write (0666) is more than enough.
m
0
l
October 29, 2009 12:44:26 AM

another hitch may be about your ~/share directory (the one you created as mount point): ensure that the user has read/write access to it (it should, but I don't know what your setup is).
m
0
l
October 30, 2009 10:30:14 PM

The share directory permissions are all ok, and i tried adding rw on the end but still no luck. Looking at this, i wonder if the file_mode and dir_mode 0777 are suposed to set the permissions, such as chmod 0777?

Anyways, ill keep trying to get this working. I think the next thing I'm gonna do is set up a specific account for sharing on my win7 box, and seeing if i can get the permissions solved that way.

If you have any more ideas, feel free to share :) 
m
0
l
October 31, 2009 10:12:58 AM

yup, dir/file_mode and chmod use exactly the same codes, in the same order: owner/group/world.
I recommend AGAINST making all files executable on a file share!
One stupid thing: is the username you use to set up the share allowed to write to it on the server? Because the client seems correctly set up.
m
0
l
November 2, 2009 4:15:00 AM

As a related note, the release notes of Ubuntu 9.10 state:

Windows 7 domain member fails to authenticate to Ubuntu 9.10 Samba domain controller

After upgrading a Samba domain controller to Ubuntu 9.10, Windows 7 domain members will not be able to authenticate to it even if their registry settings were modified as outlined in http://wiki.samba.org/index.php/Windows7 prior to joining the Samba domain. A fix for this issue will be provided in a post-release update immediately after the Ubuntu 9.10 release. (462626)
Samba nmbd daemon not started during boot

On an Ubuntu 9.10 system with Samba installed, the nmbd daemon may fail to start on boot.
To workaround this problem, restart the samba service once the system has finished booting by running sudo service samba restart. A fix for this issue will be provided in a post-release update. (462169)

May help others / users finding this with Google. :) 
m
0
l
November 14, 2009 4:42:41 AM

just an update, using apt-get upgrade a bunch of new smb stuff was installed today, and i now have proper access to all of the shared files.

Cheers
m
0
l
November 14, 2009 7:45:53 AM

Ah - remember that Ubuntu uses Debian source packages, and that Debian very often patch upstream packages or add compilation instructions for safety reasons. Sometimes, these patches can interfere with a package's proper operation - so, if you can't find why something doesn't work as specified in the manual, a fast lookup on your distribution's fora may shed some light as for the why, and eventually direct you to existing bug reports - or post your own.

If you do that properly (it's a matter of a few minutes), you may soon get:
- a workaround (often, an alternate setting in a config file)
- a test build from the distribution's package manager, that will eventually end up in main repositories (changing compilation options, reverting custom patches)
- a complete bug report submitted to the software's author, who will then spread the fix amongst all users ("downstream").

Here, it seems to fall in the third category: the problem was that in Win7, ntlm2 is used for authentication by default (ntlm1 was default before); so ntlm2 uses data blobs bigger than 255 bytes, which Samba couldn't handle. Samba's upstream patch to 3.3, 3.4 and git adds support for large ntlm2 blobs in wbcAuthenticateUserEx().

Expect a bunch of firmware updates for routers etc. soon.
m
0
l
December 23, 2009 2:46:12 AM

I am having this exact issue, i was using Ubuntu 8.04 with no luck, then did a new install with 9.10 still no luck, i am getting "cannot receive share list", i can connect to win xp machines, and other win 7 machines can connect to my win 7 share. I have password protect sharing off. Any other suggestions?

Thanks
m
0
l
Anonymous
a b $ Windows 7
January 29, 2010 1:14:04 PM

I have a similar problem using smbnetfs ....

Linux sees Vista shares - but not Win 7 - it finds the Win 7 box but shows no shares.

Vista sees Win 7 shares. So, shares are correctly set up.

I've tried dozens of so-called fixes - no-one seems to have the solution!

Help please .....
m
0
l
Anonymous
a b $ Windows 7
January 29, 2010 1:15:13 PM

Just a point -

I don't have WLA on Win 7 ...
m
0
l
March 8, 2010 4:04:45 PM

there is no solution, only the question...
m
0
l
Anonymous
a b $ Windows 7
March 15, 2010 5:54:24 AM

Im having the problem for linux samba sharing cont access in the windows 7 maching. while connecting the samba share its ask the network passwd i dont know the passwd i know the samba passwd only.

how to open the samba share from linux in windows 7 machine
m
0
l
May 2, 2010 8:14:53 AM

The solution is to change the Security settings of the folder on the Windows machine.
Enabling sharing is not enough. I wasted a day figuring this out.
To fix, right-click on the folder/share you want to access from the linux box.
Go to Properties>Security
In Group or user names, hit Add
Add Everyone to the list of users.
Assign Everyone full control. Hit OK.
Your folder is now accessible from the linux box.
m
0
l
!