[solved] setup samba share to windows 10

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
rsbkh
Level 1
Level 1
Posts: 3
Joined: Sat Jan 04, 2020 12:14 pm

[solved] setup samba share to windows 10

Post by rsbkh »

I'm really new at Linux but I have enough of a background that I could really make a mess of things. I have linux mint 19.2 finally installed on my old pc. Finally got the grub bootloader installed properly. Samba is installed and I think I have the sharing and permissions set for file sharing. What I have set up so far is the OS set up on a 320GB hdd. I also have a couple of 1TB hdds that I'd like to use for accessing media like pictures, videos and music. These folders are what I have shared and set for general read/write permissions for everyone. I can't find it on the network now. Could someone please help me with this final set up part?
Last edited by rsbkh on Sat Jan 04, 2020 3:25 pm, edited 1 time in total.

altair4
Level 20
Level 20
Posts: 10127
Joined: Tue Feb 03, 2009 10:27 am

Re: setup samba share to windows 10

Post by altair4 »

Windows 10 - if you kept it up to date - can't discover anything using NetBIOS because it disabled smb1 on the client side.

I suggest one of two options:

[1] You can still connect to the Mint server but have to ask for it by name:

On the mint machine find your exact host name with this command:

Code: Select all

hostname
On Windows 10 ask for the machine in explorer as:

Code: Select all

\\mint-host-name.local
With the hostname you found in the step above with a .local attached at the end.

[2] If you really want to be able to "discover" the Mint machine in explorer you need to implement the way Win10 does it with this: [Part 1b] WSD = WS-Discovery
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

rsbkh
Level 1
Level 1
Posts: 3
Joined: Sat Jan 04, 2020 12:14 pm

Re: setup samba share to windows 10

Post by rsbkh »

WOW! Would never have come up with that one. I've been trying everything i could find online. Thanks so much.
How did you ever come up with that solution?

altair4
Level 20
Level 20
Posts: 10127
Joined: Tue Feb 03, 2009 10:27 am

Re: [solved] setup samba share to windows 10

Post by altair4 »

I'm not smart enough to have come up with that. Steffen Christgau over at GitHub was the one that came up with it.

At best I just listed the steps to make it more Ubuntu specific.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

rsbkh
Level 1
Level 1
Posts: 3
Joined: Sat Jan 04, 2020 12:14 pm

Re: [solved] setup samba share to windows 10

Post by rsbkh »

Well, it was working and then I rebooted the machine and now it's not working. Please don't tell me that I need to run this manually every time log in.
I was hoping the file sharing would take effect whenever I turn on the server.

altair4
Level 20
Level 20
Posts: 10127
Joined: Tue Feb 03, 2009 10:27 am

Re: [solved] setup samba share to windows 10

Post by altair4 »

Crap.
EDIT: Forget this. It doesn't work. THis is going to take a bit. Something must have changed internally to Ubuntu and I don't know what it is yet.

I need your help.

...
...
Last edited by altair4 on Sat Jan 04, 2020 6:49 pm, edited 1 time in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

altair4
Level 20
Level 20
Posts: 10127
Joined: Tue Feb 03, 2009 10:27 am

Re: [solved] setup samba share to windows 10

Post by altair4 »

OK. I got the idea from a problem report of this in GitHub ( https://github.com/christgau/wsdd/issues/23 ). There it was a change to the code but mine is to add a sleep command in the systemd service. It ain't pretty but it seems to work repeatedly in Xubuntu.

Edit /etc/systemd/system/wsdd.service and insert a sleep command:
[Service]
Type=simple
ExecStartPre=/bin/sleep 10
ExecStart=/usr/bin/wsdd --shortlog
Do the systemd commands:

Code: Select all

sudo systemctl daemon-reload
sudo systemctl start wsdd
sudo systemctl enable wsdd
Check the status sudo service wsdd status then reboot and check again/
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

altair4
Level 20
Level 20
Posts: 10127
Joined: Tue Feb 03, 2009 10:27 am

Re: [solved] setup samba share to windows 10

Post by altair4 »

Just an update.

There is an open issue - at least as of this writing - at the guthub home of wsdd: https://github.com/christgau/wsdd/issues/18

It looks like the developer as a workaround has decided to do something closer to what I suggested above:
You can also add a line like ExecStartPre=/bin/sleep 2 to the systemd unit file (or similar for other init systems). This may not hurt the overall experience since the host can still be discovered - even some few seconds later. However, a real solution in the code would respect such situations as well as other changes to interfaces (e.g. changes WiFi networks) but this is more a little more difficult to implement in a portable way for FreeBSD and Linux and it is worth a separate issue.

As a temporary workaround, I propose to change the unit file as hinted above. I'll add an according comment to the template unit file in etc and close that issue afterwards.
It looks like setting it to 10 was a bit of an overreaction on my part as it seems 2 will work as well.

I will change my little HowTo accordingly.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

Post Reply

Return to “Other networking topics”