Windows 7 linux file share problem

kyeana

Distinguished
May 21, 2008
1,290
0
19,310
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.
 
Solution
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.

kyeana

Distinguished
May 21, 2008
1,290
0
19,310
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
 
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.
 
Solution
G

Guest

Guest
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
 

jasperjones

Distinguished
Aug 15, 2009
96
0
18,640
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...
 
G

Guest

Guest
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,
 

kyeana

Distinguished
May 21, 2008
1,290
0
19,310
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 :)
 
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.
 

kyeana

Distinguished
May 21, 2008
1,290
0
19,310
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 :)
 
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.
 

sub mesa

Distinguished
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. :)
 
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.
 

minideezel

Distinguished
Dec 22, 2009
1
0
18,510
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
 
G

Guest

Guest
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 .....
 
G

Guest

Guest
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
 

Red Flag

Distinguished
May 2, 2010
1
0
18,510
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.