Sharing new UM 16.10 to windows - doesn't

I have a Windows 7 workgroup and I want to be able to share files from the Windows system with a ubuntu user and vice versa. Right now, I’d settle for either to work.

My background:
While I used unix systems for years back in the old days, samba is new to me. I have been playing around with various linux systems for the past 5 years on PCs and Raspberries and have written advanced shell scripts and did system configurations but only on machines intended to stand alone and certainly not connected to Windows.

More info:
The ubuntu system doesn’t see any shares from the windows machines and the windows machines do not see the ubuntu machine in the Network view. Once, it actually showed up but only for a short time.

I configured samba with the homegroup name of the win 7 machines. I can ping windows machines from ubuntu and vice versa. I’ve turned off the ubuntu firewall and even the windows firewall all to no effect.

Windows machines have shares between each other working just fine.

I shared my home public directory as a test.

I upgraded today so ubuntu is up-to-date.

If I go into file mgr on ubuntu and select “other locations”, I see “Windows Network”. Opening it gets me “opening smb:///” and it just sits there. Cancel is the only option.

I have not found any info on the net that will help me and don’t even know if this is the best forum for my question.

The samba log files don’t tell me anything I can understand.

Samba is a bit complex but let me suggest … install caja-share, then logout/login again. Create a Pezz folder in your home dir. Right click, sharing options, set the share name and options. It will prompt to setup permissions, accept. Now the folder Pezz has an arrows icon on the top right, indicating sharing.

Restart samba, check it is running … ps -ef | grep mbd (you may have smbd and nmbd)

On windows7, you should see the UM host in the Network and if you open that, the Pezz folder should be there where you can create new document/folder. I went to Networking options, disabled authentication, enabled broadcast. Also, drop the firewall since ports may be blocked.


1 Like

Let’s face it, samba is pure evil – yet sometimes a necessary evil. It took me forever to get it to work. A couple of slightly weird things I have to do to get it to work on my network may help:

  1. Add the line “name resolve order = lmhosts wins bcast host” to the [Global] section of /etc/samba/smb.conf. Also while that’s open, make sure the WORKGROUP field shows the same name as your Windows workgroup. I’ve forgotten to change that more than once when in a hurry.

  2. On the odd occasion, I’ve also had to change the “hosts” line of /etc/nsswitch.conf to read “hosts: files mdns4_minimal [NOTFOUND=return] dns wins mdns4”.

  3. Extremely rarely, but frequently enough to mention, I’ve had to restart my router to get everything to show up – of course, that may just be the crappy router my ISP provides.

One thing I’ve found invaluable is the system-config-samba application. Whereas the templates in the default smb.conf thoroughly describe how to set up shares, it is, like @pavlos_kairis said, extremely complex.

Finally, restart the machine. Just restarting smbd and nmbd doesn’t always work.

Hope this helps. I put off using any distro at all for several years until I figured this out.

But then, I freely admit to having a very low frustration threshold…

I went through this hell with Samba, until…
With Samba installed, also right click on folders in Ubuntu for “sharing options”
Try, “File” >Connect to server, add IP address, “Type” is Windows share

OK. Sorry for not being able to try these earlier but I was away.

I tried what you said, installing caja-share. Don’t understand why but I did it. The share has the arrows. Restarted Samb (and even reboted). Windows still does not show linux on network map. Tried to connect from windows to the shared directory by right-clicking Network on Windows and doing a “Map Network Drive”. It eventually failed. Selecting troubleshooting got me this message from the troubleshooter: Problems Found. file and print sharing resource (john-linux) is online but isn’t responding to connection attempts.

I added the line mentioned in #1 and verified the workgroup is correct.
I have not tried #2 yet
I tried #3 and rebooted router. Then tried rebooting linux.
I installed system-config-samba and ran it from terminal using sudo. Got a number of messages, the last of which was Could not open /etc/libuser.conf. No such file or directory.

I don’t see any option to do this:
Try, “File” >Connect to server, add IP address, “Type” is Windows share
I do open “Other Locations” and see “Windows Network” but opening it gets me
Unable to access location
Failed to retrieve share list from server: No such file or directory

Home folder, top left, “File”

Let’s try another way. Please edit your /etc/samba/smb.conf and add to the bottom
path = /home/jpezz/public
writable = yes

That creates a share called public, it points to the location /home/jpezz/public (create this folder, I assume jpezz is your login) and is writable. I assume the workgroup is the same for Linux and win7. Save file, restart samba. You can run testparm to verify that there are no errors in smb.conf

On the Win7, you should be able to see your linuxbox in Network and the share. Or from the File Manager you could type \\linuxbox and see its shares. You can try with the ip (\\ if the name does not work.

caja-share is an add-on to the Ubuntu Mate file Manager (caja) to enable sharing of folders.

1 Like

We have a failure to communicate here.

Are you talking about opening the icon that is part of the column of icons down the left side that looks like a file drawer? Hovering over it, it says Files. However, there is no option as you describe. However, if I open the File cabinet, I see my files. Right clicking on any folder gives me as an option Local Network Share, That’s what I have been using to set up a share. There is no Type in the menu.

If I open a terminal window, there is the usual (along the top of it):
Terminal File Edit View Terminal Search Help
none of which do anything with either left or right mouse buttons.

Can you enlighten me?

A AHA! moment. caja wasn’t installed. Now I can run the caja file manager. I had previously, at your suggestion, installed caja-share. It never complained about not having caja.

I edited conf file and added /home/john/Public (my login is john). That was accepted and testparm told me:
Processing section "[Public]"
Loaded services file OK

I then rebooted the system.


The Linux system now shows up in the Windows Network screen

Both the jpezz (a folder I previously tried to share by rightclicking and sharing) and Public directories now can be seen from Windows.

I can see and create files in them.

I will do more testing as it seems the sometimes when double-clicking on Public, it prompts me for a login and password then refuses to accept my Linux credentials. Selecting jpezz does not ask for anything but if I select jpezz then go back to Public, it does not prompt me again.

Thanks everyone. At least I have made a lot of progress with all the help.

1 Like

Ok, open HOME folder on desktop, top left corner “File”, “Connect To server”,

Server is IP address of Win box/ Lin box

Type is “Windows share”

Hit connect, should be able to search for desired folders…

Good luck!!

Glad you made it work. You could add in the [public] section of smb.conf guest ok = yes
Restart samba and try again, maybe this time it will not ask for auth.

Oops, sorry, forgot to mention that, for some reason, you have to run sudo touch /etc/libuser.conf before the first time you run system-config-samba. It will run fine every time afterward.