bossmoss
Posts: 4
Joined: Sat Mar 07, 2015 7:35 am

Can't connect to Windows machine

Wed Mar 25, 2015 1:04 am

I am a total beginner to Raspberry Pi 2. I have it connected to a wired network that only has one other machine, a Win 7 computer. I am pretty sure I installed CIFS and Samba correctly in order to make a folder on my Pi available to the network. I then also modified my FSTAB file by adding this line:

//192.168.0.100/c/pi /media/share cifs username=myusername,password=mypassword,uid=1000,gid=1000,ipcharset=utf8 0 0

Obviously myusername and mypassword represent where I put my real username and password for the Windows machine.

As it turns out, my Windows machine can see and login to my Raspberry Pi, but my Raspberry Pi won't connect to my Win 7 machine.

I added a 2nd Win 7 machine to the network just to see if IT had any trouble logging into the first Win 7 box, and it worked fine first try. So I don't see it being any router or firewall issues, and the Win 7 system seems to be configured right.

The Raspberry Pi is able to ping the I.P. of the Win 7 machine. Just not connect the way it should.

I am so new to this, I am sure I am making some dumb mistake. Any suggestions are appreciated.

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: Can't connect to Windows machine

Wed Mar 25, 2015 3:50 pm

To make a folder on your pi available over the network, samba has to be configured. You need to edit the samba.conf file. There are many guides for this on the internet.
Unix engineer since 1989

bossmoss
Posts: 4
Joined: Sat Mar 07, 2015 7:35 am

Re: Can't connect to Windows machine

Wed Mar 25, 2015 6:47 pm

Thanks, but Samba is not the issue. In fact Samba seems to be working fine, since other computers can connect and view my shared folder on my Raspberry Pi. It is the Fstab file that seems to be failing. I have looked at the numerous examples of how to have the Pi connect to a directory on another system on the network by configuring Fstab. To the best of my knowledge, my Fstab file is configured correctly. But my Pi still won't connect to my Windows machine.

asavah
Posts: 373
Joined: Thu Aug 14, 2014 12:49 am

Re: Can't connect to Windows machine

Wed Mar 25, 2015 6:59 pm

Your fstab entry is mostly right
it's iocharset not ipcharset

For debugging forget about fstab and mount with -v (verbose) from commandline to see errors if any.

Code: Select all

sudo mount -v -t cifs -o username=myusername,password=mypassword,uid=1000,gid=1000,iocharset=utf8 //192.168.0.100/c/pi /media/share
If there are any errors you will see them.

bossmoss
Posts: 4
Joined: Sat Mar 07, 2015 7:35 am

Re: Can't connect to Windows machine

Wed Mar 25, 2015 8:01 pm

Thanks. I get a mount error(13) Permission Denied. Which indicates the problem may not be the Pi, but the Windows system. Other Windows systems can connect, though. I even tried setting up a unique user windows user account for the Pi, and that still gives the mount error(13) Permission Denied.

At least I have a clue about where to look for the solution now. Thanks.

bossmoss
Posts: 4
Joined: Sat Mar 07, 2015 7:35 am

Re: Can't connect to Windows machine

Wed Mar 25, 2015 8:25 pm

I managed to solve the problem, thanks to your help. I modified the fstab configuration line to include this: sec=ntlm

so it looks like this now:

//192.168.0.100/c/pi /media/share cifs sec=ntlm,username=myusername,password=mypassword,uid=1000,gid=1000,iocharset=utf8 0 0

Apparently it has to do with the way the username/password credentials are encrypted. As I understand it, it is not set to ntlm by default, and if that is what the Win 7 system requires, you have to explicitly state it in the fstab configuration.

I say that as if I really understand it - which I don't. But it works now, so thanks!

Return to “Beginners”