You are not logged in.

#1 2015-02-12 10:09:31

rabcor
Banned
Registered: 2013-02-09
Posts: 500

[Solved] Samba share not detected bt windows

I'm trying to set up two-way file sharing between Linux and a Windows 7 system I have with samba. I've never used samba before and networking has always been my weakest point in life, so I was bound to fail to understand how to do this correctly, this is how it went for me after installing samba and trying to follow the wiki.

I copied the default smb.conf in /etc/samba/ and then edited the following in there:

[global]
   workgroup = WORKGROUP
   server string = Linux
   load printers = no

[public]
   path = /mnt/stash/Windows
   public = yes
   only guest = yes
   writable = yes
   printable = no

(Besides the public folder over there, I disabled all the shares)

Next up I opened ports on iptables with ufw (ufw allow 43270 and ufw allow 43273)

And ran systemctl samba start to run samba. I would have thought it should work by now, but I'm not finding my system in the network driectory on windows, I can however see the windows share on linux in thunar with gvfs-smb. I looked around and all I could find was that samba doesn't support 128-bit encryption, so I set windows to allow devices with lower encryption as suggested, but that didn't help. So I'm stuck at windows to linux sharing with no linux to windows sharing.

Here is the output of testparm:

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[public]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
	server string = Linux
	log file = /var/log/samba/%m.log
	max log size = 50
	load printers = No
	printcap name = /etc/printcap
	dns proxy = No
	idmap config * : backend = tdb

[public]
	path = /mnt/stash/Windows
	read only = No
	guest only = Yes
	guest ok = Yes

Did I go wrong somewhere? or did I miss something? I'm considering using NFS instead, it seems more convenient and faster at a glance...

Last edited by rabcor (2015-02-19 23:28:36)

Offline

#2 2015-02-12 12:28:48

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: [Solved] Samba share not detected bt windows

Did you start the nmbd.service too? It is needed for windows network discovery


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#3 2015-02-16 13:44:25

rabcor
Banned
Registered: 2013-02-09
Posts: 500

Re: [Solved] Samba share not detected bt windows

Nope, I had not, I activated it, and now the windows PC does detect the Linux one (thanks!), but it can't seem to access it. (I wonder if it's because I don't have any active shares...)

Offline

#4 2015-02-17 08:01:45

dice
Member
From: Germany
Registered: 2014-02-10
Posts: 413

Re: [Solved] Samba share not detected bt windows

rabcor wrote:

(I wonder if it's because I don't have any active shares...)

Yes, this is very likely the case


I put at button on it. Yes. I wish to press it, but I'm not sure what will happen if I do.  (Gune | Titan A.E.)

Offline

#5 2015-02-18 18:19:29

rabcor
Banned
Registered: 2013-02-09
Posts: 500

Re: [Solved] Samba share not detected bt windows

Oh no wait, I actually do have a samba share.

[public]
   path = /mnt/stash/Windows
   public = yes
   only guest = yes
   writable = yes
   printable = no

Why won't that work?

Offline

#6 2015-02-18 18:30:57

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 507

Re: [Solved] Samba share not detected bt windows

Does Windows have a samba server?


An old man, trying to stay sane

Offline

#7 2015-02-18 18:46:37

Spider.007
Member
Registered: 2004-06-20
Posts: 1,176

Re: [Solved] Samba share not detected bt windows

Why did you open those two ports? I'd open 137-139 and 445 instead, since those are used by samba

Offline

#8 2015-02-18 20:03:52

cris9288
Member
Registered: 2013-01-07
Posts: 348

Re: [Solved] Samba share not detected bt windows

When you try and access Linux samba from Windows, you are doing it with the default Windows user I assume? In your case, do you have a matching user on the server and does this user have permissions to those share directories? If not, then I would create one and also create it using smbpasswd ( someone correct me if you don't have do this ). The other option is to create a guest user - that is used as a default when the user you are attempting to access the shares does not exist on the samba server. I would read up on the "guest account", "security" and "Map to guest" options for smb.conf. This guest user will have to exist on the server and be in the samba password database, as well as have permissions on the folders you listed in the share definition.

Offline

#9 2015-02-18 21:38:16

rabcor
Banned
Registered: 2013-02-09
Posts: 500

Re: [Solved] Samba share not detected bt windows

Buddlespit wrote:

Does Windows have a samba server?

No; I thought the whole point of this was to make network shares readable on windows from linux without any tampering on the windows side, I tried looking into whether I could download a samba client for windows but didn't find anything... (Maybe I didn't look hard enough?) The wiki didn't say anything about this either.


Spider.007 wrote:

Why did you open those two ports? I'd open 137-139 and 445 instead, since those are used by samba

Because I misread the samba wiki (i.e.the "example" given on that page is what I forwarded). Fixing this solved my problem, thanks!

cris9288 wrote:

When you try and access Linux samba from Windows, you are doing it with the default Windows user I assume? In your case, do you have a matching user on the server and does this user have permissions to those share directories? If not, then I would create one and also create it using smbpasswd ( someone correct me if you don't have do this ). The other option is to create a guest user - that is used as a default when the user you are attempting to access the shares does not exist on the samba server. I would read up on the "guest account", "security" and "Map to guest" options for smb.conf. This guest user will have to exist on the server and be in the samba password database, as well as have permissions on the folders you listed in the share definition.

Yeah I ran smbpasswd to make a user with r/w access to the share directory just now tongue I'll probably be able to figure out the rest on my own now that I managed to make both systems read each other, I'll read up on the guest user if I ever have to sue it, but since I'm only sharing files between 2 computers and I'm the only user, I doubt I'll have to worry much about security.

But I have one last issue before this is all working as I want it to, I want some of the shared directories from my windows system to be placed at specific locations on my linux filesystem (for example I am sharing a movies directory from windows, and I would like to be able to access it from /mnt/stash/Movies) in Windows it's straightforward enough to use the shortcut system for this, but since "smb://.../" isn't a valid path, I can't just make symlinks like I'd usually have wanted to.

Offline

#10 2015-02-18 21:56:59

cris9288
Member
Registered: 2013-01-07
Posts: 348

Re: [Solved] Samba share not detected bt windows

rabcor wrote:
Buddlespit wrote:

Does Windows have a samba server?

No; I thought the whole point of this was to make network shares readable on windows from linux without any tampering on the windows side, I tried looking into whether I could download a samba client for windows but didn't find anything... (Maybe I didn't look hard enough?) The wiki didn't say anything about this either.


Spider.007 wrote:

Why did you open those two ports? I'd open 137-139 and 445 instead, since those are used by samba

Because I misread the samba wiki (i.e.the "example" given on that page is what I forwarded). Fixing this solved my problem, thanks!

cris9288 wrote:

When you try and access Linux samba from Windows, you are doing it with the default Windows user I assume? In your case, do you have a matching user on the server and does this user have permissions to those share directories? If not, then I would create one and also create it using smbpasswd ( someone correct me if you don't have do this ). The other option is to create a guest user - that is used as a default when the user you are attempting to access the shares does not exist on the samba server. I would read up on the "guest account", "security" and "Map to guest" options for smb.conf. This guest user will have to exist on the server and be in the samba password database, as well as have permissions on the folders you listed in the share definition.

Yeah I ran smbpasswd to make a user with r/w access to the share directory just now tongue I'll probably be able to figure out the rest on my own now that I managed to make both systems read each other, I'll read up on the guest user if I ever have to sue it, but since I'm only sharing files between 2 computers and I'm the only user, I doubt I'll have to worry much about security.

But I have one last issue before this is all working as I want it to, I want some of the shared directories from my windows system to be placed at specific locations on my linux filesystem (for example I am sharing a movies directory from windows, and I would like to be able to access it from /mnt/stash/Movies) in Windows it's straightforward enough to use the shortcut system for this, but since "smb://.../" isn't a valid path, I can't just make symlinks like I'd usually have wanted to.


You can accomplish that with mount points in fstab, if I am understanding you correctly.

Offline

#11 2015-02-19 18:18:44

rabcor
Banned
Registered: 2013-02-09
Posts: 500

Re: [Solved] Samba share not detected bt windows

Allright, thanks for your help guys smile

Offline

#12 2015-02-19 20:18:38

Spider.007
Member
Registered: 2004-06-20
Posts: 1,176

Re: [Solved] Samba share not detected bt windows

Can you mark this topic as solved? smile

Offline

Board footer

Powered by FluxBB