I have been trying to set up a raspberry pi so that I can fileshare through samba with a windows PC using an ethernet cable, while still being able to connect to internet using WiFi. Right now I can connect to the pi occasionally through the ethernet cable, but it seems to drop out frequently. When I view network devices I can see the pi, however when I try to connect I am usually greeted with the message "\RASPBERRYPI is not accessible. You may not have permission to use this resource. User name not found."

If anyone has any idea of how I can fix this problem it would be greatly appreciated. I do not have any issues if I try to file share using the same wifi network, but at my location the wifi network is very slow and prone to dropouts which is why it is of critical importance to use ethernet.


It depends on which OS you are using and how you have configured networking. Also you haven't posted your current ifconfig.

The default for current Raspbian is dhcpcd (which does an excellent job and is quite robust). The problem is it tries to automatically configure ALL network interfaces. This probably means it is trying to get an IP address for eth0 from Windows.

One solution to this is to allocate a static IP address (in dhcpcd) to eth0.

It would seem to be simpler (assuming your Windows machine is connected to your router) just to transfer files via your network. Also ftp is likely to be faster and more reliable.


THE HARD WAY you need 2 router.

  1. you bind samba to a specific interface that's connected to a router that you just use as a access point without a gateway, and you modify the global section in your smb.conf as follows

    [global] interfaces = eth0 bind interfaces only = yes

in this way samba will only use eth0, for example.

  1. then you connect to another router with your wlan0 for example and this router will have a gateway and route to the internet.

THE EASY WAY you block in your nat capable router the ports

UDP/137    - used by nmbd
UDP/138    - used by nmbd
TCP/139    - used by smbd
TCP/445    - used by smbd

have fun

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.