Ubuntu – How to access shared files on Ubuntu from a windows machine

networkingsharewindows

I have shared a folder on my ext4 drive mounted at /media/data using the GUI.

enter image description here

Now it appears in my Places -> Network and I'm able to access it, after giving password, at smb://wim-ubuntu/ab/

However in windows I can't access the share, they see this error:

enter image description here

I have tried creating a user on the Ubuntu machine with username/password which match what the windows user has, but no joy… what am I missing?

The 'diagnose' button on windows doesn't really offer anything useful, it says that the location WIM-UBUNTU exists but the share can not be found.

Best Answer

On way of doing it is to add the shares in /etc/samba/smb.conf with the following format.

[sharename]
         path = /media/yourshare

If you are having problems with login you can allways use this to test if the samba server works.

guest account = yourusername
guest ok = yes

But these should only be used for testing, because it disables your security, and tells samba that all the guest's are you.

Some other usefull parameters/settings are:

read only = yes
valid users = yourusername

When you have the configuration file as you like, restart the samba deamon.

sudo service smbd restart
Related Question