MichaelL65
Posts: 4
Joined: Wed Feb 04, 2015 4:32 pm

Windows can see RPi, Rpi can't see Windows

Wed May 20, 2015 4:47 pm

I've installed and configured Samba so that my Pi can be seen and accessed from the Windows 7 machines on the network.

My Pi, though, cannot access the network other than pinging other machines. It wants me to log into a domain, which we do not use (just a workgroup).

I'm assuming that there is some configuration file that I don't have modified quite right yet. Any ideas?

(My experience with Linux is rather limited, but I'm working on that.)

anita2r
Posts: 226
Joined: Sun Dec 23, 2012 6:55 pm
Location: Ottawa, Canada

Re: Windows can see RPi, Rpi can't see Windows

Sat May 23, 2015 4:54 pm

Hi,

Did you set the workgroup name in the samba configuration file: smb.conf
Near the top of smb.conf is 'workgroup = '

Not sure if this is the issue as I don't have any Windows machines running to test it

Regards

anita2R

zardoz66
Posts: 77
Joined: Wed Jan 02, 2013 1:02 am
Location: Austin TX
Contact: Website

Re: Windows can see RPi, Rpi can't see Windows

Sun May 24, 2015 3:38 pm

also check on any windows firewall.
Zardoz
Raspberry Pi 3 | Raspbian Jessie | 32GB Samsung EVO+ | D-Link 7 port USB HUB | Sabrent CRW-EXT 6-Slot Card Reader | 64GB USB Storage. Other RPi's - 2x RPi1b, 1x Rpi1b+ 1x Rpi2b, 2x Rpi3b
Join us on IRC #raspberrypi at https://webchat.freenode.net/

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Windows can see RPi, Rpi can't see Windows

Thu May 28, 2015 1:14 pm

Samba configuration is not the problem, since you don't use Samba to access a Windows share. Samba is only needed for Windows to access shares on the RPi. I access Windows shares on 3 Windows PC's using my RPi's and don't even have Samba installed on any of the RPi's.

Code: Select all

sudo mount -t cifs -o credentials=/home/jimmy/.smbcredentials, uid=jimmy, gid=jimmy //192.168.0.3/projects /home/jimmy/Asrock

Note that the above is all one line, NO line breaks.
That mounts the Windows shared folder "projects" to the RPi's mount point "/home/jimmy/Asrock"
I use a .smbcredentials file in "/home/jimmy" which is only R/W for "jimmy" since I usually mount it with fstab and I don't want my Windows login in plain text in the fstab file. You could put the login information directly in the mount command as well.
My .smbcredentials file contains three lines for username, password, and workgroup name (it says 'domain' but it also applies to the workgroup name if you're not using a domain). Make it read/write only for the owner.

Code: Select all

username=jimmy
password=mysecretpassword
domain=workgroup
ETA: added "NO line breaks"
Last edited by JimmyN on Thu May 28, 2015 2:27 pm, edited 1 time in total.

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Windows can see RPi, Rpi can't see Windows

Thu May 28, 2015 2:12 pm

I forgot to add that there is one 'gotcha' involved and you may encounter it. If you mount the Windows share and then unmount it and then try to mount it again it may give you a "remote I/O error". I haven't dug into why that happens since I typically only mount the share once, but if you need to unmount it and then mount it again a second time and get an I/O error you'll need to reboot Windows. Apparently Windows stores something on the first mount, then when unmounted on the RPi Windows may not allow it to be mounted a second time, sometimes it does and sometimes it doesn't. If Windows balks then you'll need to reboot Windows and start over fresh. Or if you figure out why it does that let me know :mrgreen:

MichaelL65
Posts: 4
Joined: Wed Feb 04, 2015 4:32 pm

Re: Windows can see RPi, Rpi can't see Windows

Fri May 29, 2015 6:39 pm

Ok, not exactly what I am looking for, but re-reading my post it was a bit ambiguous.

I'm trying to access the network from the x-windows environment with the file manager program. That is where I get the insistence that I log into the non-existent domain.

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Windows can see RPi, Rpi can't see Windows

Sat May 30, 2015 4:28 pm

So you want to access a Windows 7 shared folder using the RPi's desktop file manager, rather than actually mounting the share on the RPi?

The longer way:
Open the File Manager and click on "Go" in the toolbar then select "Network". You should see "Windows Network" listed, double click on that and you'll see the Windows 7 workgroup name listed, double click on that to expand it. You should get a list of all PC's, NAS, etc that are part of that Windows workgroup. Double click on the PC you want to access. When the login box pops up enter your Windows7 username, enter "workgroup" for the domain, and enter your Windows7 password. That works for me.

The shorter way:
You can use a shorter method rather than all those steps. In the example I gave above the hostname for the PC being accessed was 'Asrock', so to get there quicker I would open the RPi's File Manager and in the address line type in "smb://Asrock/" That will bring up the login dialog box. As in the longer method use "workgroup" as the domain.

MichaelL65
Posts: 4
Joined: Wed Feb 04, 2015 4:32 pm

Re: Windows can see RPi, Rpi can't see Windows

Wed Jun 03, 2015 2:34 pm

That is what I am trying to do but it will not let me browse the network.

I double click on the Windows Network Icon, which brings up an icon for the workgroup. I double click on it and it asks me to login then. I haven't gotten to any of the computers on the network, just clicking on the workgroup. I have tried my normal login, logging in as Pi, even tried skipping the login but nothing works.

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Windows can see RPi, Rpi can't see Windows

Thu Jun 04, 2015 12:20 pm

I don't get a login box when clicking on the workgroup icon, that doesn't appear until I click on a hostname, but I have quite a few systems in that workgroup maybe you only have one.

Let's simplify things as much as possible, we'll eliminate using the Windows hostname, the workgroup selection, and even the shared folder name and see how that works.

On the Win7 system click on the "Start" button and type cmd into the search box and press enter. When the command line comes up type ipconfig and press enter. Under the "Local Area Connection" list at the top get the current IP address for the Win7 system. We'll use that ip address rather than the Win7 hostname.

Now go back to the RPi and start the file manager. In the address line type in

Code: Select all

smb://theWin7ipaddress
That will give you the login box to enter your Windows user and password. Note that you always need to use 'workgroup' as the domain or workgroup name. My Windows workgroup on the LAN is named "NSI", but whether mounting the share with fstab, command line, or the RPi file manager using the actual Windows workgroup name (NSI) always fails, but using workgroup always works.

Once you login in using that method (not providing a shared folder name) you'll see all the Windows7 drives and shared folders. But you'll only be able to access the shared folders, any drive or folder listed that is followed by a "$" will not be accessible.

The RPi's file manager is just a GUI method to mount a drive rather than using the command line. It does the same thing as manually mounting it by creating a mount point and then mounting the Windows share, then it unmounts and cleans up when you reboot/shutdown.

If you still can't access it using the RPi's file manager try it directly from the command line to see if you get any error message as to why it's not working.
Double click on "LXTerminal" to open a terminal window.
Create a mount point on the RPi

Code: Select all

mkdir /tmp/win7
Then mount the share and supply your Windows credentials, then you shouldn't even get a login box.

Code: Select all

sudo mount -t cifs //theWindowsIPaddress/sharedFoldername /tmp/win7 -o username=yourwindowslogin, password=yourWindowspassword
If you don't get any error the share was mounted. Use df -h and you should see it listed.

Return to “Networking and servers”