Lendal
Posts: 7
Joined: Tue May 17, 2016 4:27 pm

Rpi on a Windows Network

Wed May 18, 2016 2:53 pm

I've read the manual. I've visited various helpful websites and tried their procedures. I can't get my Raspberry Pi to recognize and access Windows shares in any sort of practical dynamic way.

Openelec and Kodi seem to have no problem recognizing and using whatever Windows shares are out there dynamically and effectively. Raspberian, not so much.

I've loaded and configured Samba at least five or six different times now. Following instructions from those helpful websites all to no avail.

At this point, I'm frustrated and feeling like there probably is no solution to this situation and I should just give up and assume it's another 'you get what you pay for'. So my post here is more to share my frustration and misery than to actually get a solution.

Maybe they'll put it in a future release. Maybe not...

:(

pcmanbob
Posts: 6414
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Rpi on a Windows Network

Wed May 18, 2016 4:32 pm

Hi.

I don't understand what you mean by " practical dynamic way "

I have connected my pi to a windows XP pro share in the past by mounting the share as a folder under /mnt
it worked well and allowed camera captures to be upload.

you can also set the share to auto-mount I believe but I must admit I never bothered.

may be a bit more information on the problem you are having would help ?
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Lendal
Posts: 7
Joined: Tue May 17, 2016 4:27 pm

Re: Rpi on a Windows Network

Wed May 18, 2016 6:01 pm

Thanks for your reply.

I got the Raspberry Pi in the first place because I thought that connecting it to my TV's HDMI port would provide a cheap way to turn the TV into a 'smart' TV able to play videos from my local library across the LAN (which Kodi actually does very well). And to be able to use a bluetooth mouse and keyboard to read my email and browse websites on the TV, too.

What I want to do is to have the Raspbian OS show me all the available Windows shares when I open the Raspbian file manager, click on 'Network' and then 'Windows Network'.

What I don't want is to have to type in several esoteric linux commands in a terminal window in order to use even one of the Windows shares on my LAN.

I now realize that I was choosing the wrong tool for the job in trying to get the Raspberry Pi to do all that. A cheap tablet with an HDMI port and bluetooth capability would have been a better choice.

I've just been a little hesitant to trash the Raspberry Pi due to it's having become a $150+ project what with all the extra goodies I've ended up investing in it (SD cards, cables, case, switched power cord, etc.) So, I was just holding out a last shred of hope that maybe there was something I was missing and might still get it to work eventually.

:|

Heater
Posts: 12966
Joined: Tue Jul 17, 2012 3:02 pm

Re: Rpi on a Windows Network

Wed May 18, 2016 6:26 pm

Lendal,
What I don't want is to have to type in several esoteric linux commands in a terminal window in order to use even one of the Windows shares on my LAN.
I sympathize with your problem.

Unfortunately learning such esoteric things is exactly the reason for the Pi to exist in the first place.

The Pi was never intended as an easy way to help one watch television.

I'm sorry that you were misled somewhere.

However perhaps the Pi will inspire you to greater things.

User avatar
lpsw
Posts: 140
Joined: Thu Jun 25, 2015 4:45 pm
Location: USA

Re: Rpi on a Windows Network

Wed May 18, 2016 6:33 pm

Lendal wrote:Thanks for your reply.

What I don't want is to have to type in several esoteric linux commands in a terminal window in order to use even one of the Windows shares on my LAN.

:|
You could always put the commands in a script that runs at boot.
Self-education is, I firmly believe, the only kind of education there is - Isaac Asimov

ghans
Posts: 7868
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Rpi on a Windows Network

Wed May 18, 2016 6:38 pm

Not to forget that this is propably a one time thing anyway.
The fstab was practically invented for this.

http://geeks.noeit.com/mount-an-smb-net ... pberry-pi/

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

mutley
Posts: 61
Joined: Sat Jan 02, 2016 8:06 pm

Re: Rpi on a Windows Network

Wed May 18, 2016 9:06 pm

I do not know of a good file browser that will do what you want on the PI, not without installing a lot of other junk you probably don't want. But I actually don't think it's necessary. Your windows shares will probably not change frequently if at all, if so you don't need a dynamic network browser / mounter, you can simply mount them on the pi as known locations. ie \\windows-box\sharename\ will not change on your network, if it doesn't carry on reading, if it does forget the rest of this message.

As stated above, fstab will solve your problem, just list the windows shares in that file and they will be mounted on startup, much like mapping a network drive to X: in windows. But, there is a problem, it means that the windows machine that the shares are located on need to be up and running at the time the PI boots, also means that any network issues / re-boots on the windows machine may cause some mount issues on the PI.
So solve the above, automount/autofs is probably a better tool to use over fstab. Simply install that and edit the file /etc/auto.smb (I believe that's the default file, documentation will tell you). This way the PI will only mount the windows box when you browse to a particular location, and if that location goes away and comes back (reboot on the windows box), it should just remount.

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

Re: Rpi on a Windows Network

Wed May 18, 2016 10:07 pm

It should work, I access Windows shares on several RPi's.

I open the Filemanager, in the menu bar click on "Go>Network". There is a pause then I see a "Windows Network" icon and click on that. Then a workgroup icon appears, click on that. Doing that right now I see 3 Windows PC's currently online, a NAS box, and a RPi since all those belong to that same workgroup.

If I click on any of those all the shares on that device show up. You will have to enter a password the first time and tell it to remember it. After you are at the share you want to use regularly then add it to your Bookmarks. In the future you'll be able to use the bookmark to jump right to it with just two clicks, and won't have to go through all the steps to get to the share.

ETA: Or you could use fstab to mount the share. Then navigate to the share mount point with Filemanager and create a bookmark for that, to make it easy to access. Using Filemanager you can get to any share on the network, but using fstab you're limited to just the shares that you've mounted.

Lendal
Posts: 7
Joined: Tue May 17, 2016 4:27 pm

Re: Rpi on a Windows Network

Wed May 18, 2016 11:12 pm

JimmyN wrote:It should work, I access Windows shares on several RPi's.

I open the Filemanager, in the menu bar click on "Go>Network". There is a pause then I see a "Windows Network" icon and click on that. Then a workgroup icon appears, click on that. Doing that right now I see 3 Windows PC's currently online, a NAS box, and a RPi since all those belong to that same workgroup.

If I click on any of those all the shares on that device show up. You will have to enter a password the first time and tell it to remember it. After you are at the share you want to use regularly then add it to your Bookmarks. In the future you'll be able to use the bookmark to jump right to it with just two clicks, and won't have to go through all the steps to get to the share.

ETA: Or you could use fstab to mount the share. Then navigate to the share mount point with Filemanager and create a bookmark for that, to make it easy to access. Using Filemanager you can get to any share on the network, but using fstab you're limited to just the shares that you've mounted.
Thanks for that, JimmyN. I wish I knew what the difference between your RPI and mine is.

I can get filemanager to show me the network icons ok. But then when I click on the "Windows Network" all I get is a blank screen.

I know the shares are there and accessible to the Pi because, if I run Kodi on it during the same session, Kodi can find all the files in all the shares that I'm trying to see in filemanager.

I assume you've installed Samba on your Pi? Could you share your /etc/samba/smb.conf file (after xxx'ing out any personal info, of course)? If there's some simple thing that I've got wrong or missing in my smb.conf file, I'd love to know what it is.

Thanks.
Last edited by Lendal on Wed May 18, 2016 11:43 pm, edited 2 times in total.

stubright
Posts: 109
Joined: Sat Dec 24, 2011 11:12 pm

Re: Rpi on a Windows Network

Wed May 18, 2016 11:33 pm

As JimmyN said it should just work.
Correct me if I'm wrong but you're trying to view a windows share on your Pi and not share a Pi folder to windows?
If that's the case do you have smbclient installed?

Code: Select all

sudo apt-get install smbclient
Once that in installed open your filemanager with

Code: Select all

smb://ip-to-windows/share-location
As far as I'm aware anything in the smb.conf file is for sharing a Pi folder over the network and has nothing to do with viewing a windows share. (It's long time since I set up a shared folder so I may or may not be wrong about any of this)

Stu

Lendal
Posts: 7
Joined: Tue May 17, 2016 4:27 pm

Re: Rpi on a Windows Network

Wed May 18, 2016 11:54 pm

stubright wrote:As JimmyN said it should just work.
Correct me if I'm wrong but you're trying to view a windows share on your Pi and not share a Pi folder to windows?
If that's the case do you have smbclient installed?

Code: Select all

sudo apt-get install smbclient
Once that in installed open your filemanager with

Code: Select all

smb://ip-to-windows/share-location
As far as I'm aware anything in the smb.conf file is for sharing a Pi folder over the network and has nothing to do with viewing a windows share. (It's long time since I set up a shared folder so I may or may not be wrong about any of this)

Stu
Thank you, Stu. I haven't installed smbclient. Actually, this is the first I've even heard of it. I'll install that right now.

I don't understand what you mean by "open your filemanager with 'smb://ip-to-windows/share-location'?. Do I type that into a terminal window to run filemanager? Do I type that into the filemanager search field? Does the "ip-to-windows" stand for an actual IP address on my LAN? Does "share-location" stand for a host/share name? I'm so confused...

Ah, well... I'll just flail around with the $shell prompt and all the various command possibilities. How much trouble could I possibly get into, right? God, I love Linux!

Did I remember to say "Thanks"? Thanks, Stu.

Image

mthomason
Posts: 113
Joined: Sun Apr 24, 2016 12:28 pm

Re: Rpi on a Windows Network

Thu May 19, 2016 3:31 am

Lendal wrote: Ah, well... I'll just flail around with the $shell prompt and all the various command possibilities. How much trouble could I possibly get into, right? God, I love Linux!
I usually find that's the best way to learn :D The absolute worst you ought to be able to do is mess up your install, and you'd only need to re-flash your SD card to fix it :) However, most file managers have a location bar, or something similar, that shows the current location they're browsing and can be edited to take you directly to another location - that's where you should be able to type the smb:// url, if everything else is working properly. There's also probably a command-line option, depending on which file manager you have installed, and probably some other ways too!

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

Re: Rpi on a Windows Network

Thu May 19, 2016 11:16 am

Lendal wrote: I don't understand what you mean by "open your filemanager with 'smb://ip-to-windows/share-location'?. Do I type that into a terminal window to run filemanager? Do I type that into the filemanager search field? Does the "ip-to-windows" stand for an actual IP address on my LAN? Does "share-location" stand for a host/share name? I'm so confused...
Open the RPi Filemanager and use the address line. For example one of my Windows 7 PC's has the hostname "asrock39". I have shared the "Downloads" folder on "asrock39". So to access that share from the RPI I could open Filemanager and in the address line use

Code: Select all

smb://asrock39/Downloads
"asrock39" has an static IP address of 192.168.0.3 so I could use this instead

Code: Select all

smb://192.168.0.3/Downloads
It does take several minutes sometimes on the first access, so be patient. If the little spinning cursor is turning in Filemanager it's still chewing on it so give it a minute or two, eventually it will connect or you'll get an error.

You install Samba on the RPi if you want to be able to access files on the RPi using a Windows PC. I do have Samba installed on a couple of RPi's, but I usually just used shared folders on Windows instead. That way I don't have to install/setup Samba on the RPi and using Windows shares the files are actually located on the Windows PC, which has a whole lot more storage space available than the RPi. So it can work either way, you can share files on the RPi and access them from Windows, or you can share files on Windows and access them from the RPi.

User avatar
Gerd
Posts: 66
Joined: Wed Mar 16, 2016 10:48 am
Location: Europe

Re: Rpi on a Windows Network

Thu May 19, 2016 12:17 pm

Lendal wrote:I've read the manual. I've visited various helpful websites and tried their procedures. I can't get my Raspberry Pi to recognize and access Windows shares in any sort of practical dynamic way.

Openelec and Kodi seem to have no problem recognizing and using whatever Windows shares are out there dynamically and effectively. Raspberian, not so much.
:(
If Kodi and Openelec find them, Raspian will too. Just go to your File Manager (the 2 Drawers in the taskbar) and click to open it. Then in the menue go to "go to" and then "Network". And then your Windows-Network will appear.
No shell or console needed. This is how it works for me.

User avatar
HawaiianPi
Posts: 4454
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Rpi on a Windows Network

Fri May 20, 2016 7:46 am

JimmyN wrote:It should work, I access Windows shares on several RPi's.

I open the Filemanager, in the menu bar click on "Go>Network". There is a pause then I see a "Windows Network" icon and click on that. Then a workgroup icon appears, click on that. Doing that right now I see 3 Windows PC's currently online, a NAS box, and a RPi since all those belong to that same workgroup.

If I click on any of those all the shares on that device show up. You will have to enter a password the first time and tell it to remember it. After you are at the share you want to use regularly then add it to your Bookmarks. In the future you'll be able to use the bookmark to jump right to it with just two clicks, and won't have to go through all the steps to get to the share.
...
stubright wrote:As JimmyN said it should just work.
...
Stu
Yup, it should work out of the box with Raspbian. Works for me too, just like above. File Manager > Go > Network, etc.

However, I find Windows CIFS/SMB too slow, so I usually mount my server shares using NFS and include the mounts in /etc/fstab so they mount at boot.

Anyway, it sounds like you messed something up using all those helpful websites, and I'd recommend you just wipe the SD card and start over with a fresh Raspbian. As long as you are using the full Raspbian (not the lite version) it should work without having to type in several esoteric linux commands in a terminal window.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

Lendal
Posts: 7
Joined: Tue May 17, 2016 4:27 pm

Re: Rpi on a Windows Network

Fri May 20, 2016 6:32 pm

stubright wrote:As JimmyN said it should just work.
...
Stu
Yup, it should work out of the box with Raspbian. Works for me too, just like above. File Manager > Go > Network, etc.

However, I find Windows CIFS/SMB too slow, so I usually mount my server shares using NFS and include the mounts in /etc/fstab so they mount at boot.

Anyway, it sounds like you messed something up using all those helpful websites, and I'd recommend you just wipe the SD card and start over with a fresh Raspbian. As long as you are using the full Raspbian (not the lite version) it should work without having to type in several esoteric linux commands in a terminal window.[/quote]

Again, thanks to all of you who responded.

And, yes, I've downloaded the Raspbian OS from www.raspberrypi.org several times. Both the one on the NOOB image and the one next to it labeled "Lite". And I've flashed them both onto SD cards (several SD cards, actually).

The result is always the same. Load File Manager > Go > Network > Windows Network > BLANK SCREEN. Wait forever. Still blank screen.

Windows shares are there some where as Kodi can find them on the LAN. Once I typed an IP address for my desktop PC and the name of one of it's shares and actually got a reaction! A prompt came up asking for a password and defaulting to "pi" as a UserID.

I put in every possible ID and password all to no avail. Just kept displaying the password prompt.

So, all in all, WAY more trouble than it's worth. Did I learn anything from all the flailing around? You betcha! I'm totally abandoning the effort. Cursing Linux in general and Raspbian in particular and moving on.

But thanks, anyway.

ps- And, yeah, I'm really delighted that it all "just works" for you guys. That makes me feel SO much better.

User avatar
Mandrewpi
Posts: 339
Joined: Sat Dec 06, 2014 2:58 am

Re: Rpi on a Windows Network

Sat May 21, 2016 3:27 pm

Why don't you just use the pi for something else? Retro game console (easy using retro pie), install Windows Iot core os onto it, give it to your kids. Don't trash it, there are many things you could do with it. There are hundreds if not thousands of projects for pi on the Internet.
A computer is only as smart as its programmer. ;)

I own:
Pi B rev.2, Pi 2 B, Two Pi 3 B, Two Pi 3 b+, Pi 4 2Gb, Pi Zero 1.2, Pi Zero 1.3, Two Pi Zero Ws.
I'm known elsewhere as mandrew1444

User avatar
Kratos
Posts: 394
Joined: Sun Apr 12, 2015 12:41 pm

Re: Rpi on a Windows Network

Sat May 21, 2016 7:01 pm

Gerd wrote:
Lendal wrote:I've read the manual. I've visited various helpful websites and tried their procedures. I can't get my Raspberry Pi to recognize and access Windows shares in any sort of practical dynamic way.

Openelec and Kodi seem to have no problem recognizing and using whatever Windows shares are out there dynamically and effectively. Raspberian, not so much.
:(
If Kodi and Openelec find them, Raspian will too. Just go to your File Manager (the 2 Drawers in the taskbar) and click to open it. Then in the menue go to "go to" and then "Network". And then your Windows-Network will appear.
No shell or console needed. This is how it works for me.
The weird thing is, sometimes it recognizes them, and other times they do not show up. Kinda strange...It usually connects if I manually ssh into it using the File Manager and the IP address of the share.

Kratos
I have posted mostly with a Pi 2 running either Ubuntu MATE, or Raspbian.

broe23
Posts: 903
Joined: Thu Jan 28, 2016 9:35 pm
Location: Central IL
Contact: Website

Re: Rpi on a Windows Network

Sun May 22, 2016 4:18 am

You need to install and configure samba for it to be recognized. You can use Winscp to log in through port 22 and move files.

Without Samba installed. It will not show up as a CIFS on Windows. I use Webmin to manage both of my Pi's on my network.
Ren: Now listen, Cadet. I've got a job for you. See this button? Ren: Don't touch it! It's the History Eraser button, you fool! Stimpy: So what'll happen? Ren: That's just it. We don't know. Maybe something bad, maybe something good.

ghans
Posts: 7868
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Rpi on a Windows Network

Sun May 22, 2016 6:46 am

I don't understand why people keep repeating
"Install Samba" , "Configure Samba" when it's clear that
OP wants to connect to and use existing Windows Shares.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

User avatar
Gerd
Posts: 66
Joined: Wed Mar 16, 2016 10:48 am
Location: Europe

Re: Rpi on a Windows Network

Sun May 22, 2016 10:31 am

Kratos wrote: The weird thing is, sometimes it recognizes them, and other times they do not show up. Kinda strange...It usually connects if I manually ssh into it using the File Manager and the IP address of the share.
Sounds more like an issue with SMB local master browser.
Best to set one machine that is running 24/7 to be your fixed master browser. Since I configured (years ago) my wifi access point to be THE master browser in my Workgroup I never had any issues with SMB shares again.
To see which machine won the election to be master browser in your Workgroup do

Code: Select all

net view
in a WINDOWS command promt. This will list all computers in your network in the format \\<NAME>.
For all of this <NAMES> (without leading "\\") do

Code: Select all

nbtstat -a <NAME>
The one with a line containing MSBROWSE is you local master browser (at the moment).

broe23
Posts: 903
Joined: Thu Jan 28, 2016 9:35 pm
Location: Central IL
Contact: Website

Re: Rpi on a Windows Network

Sun May 22, 2016 4:26 pm

ghans wrote:I don't understand why people keep repeating
"Install Samba" , "Configure Samba" when it's clear that
OP wants to connect to and use existing Windows Shares.

ghans
That is because regular Windows does not communicate with NFS. Only the Enterprise editions have NfS capabilities built in.

I have no problems accessing my Pi's through SMB or FTP on the Windows 10 machine or on the Matricom box.

There is no other way but Samba for Windows to see a Linux Server shares.
Ren: Now listen, Cadet. I've got a job for you. See this button? Ren: Don't touch it! It's the History Eraser button, you fool! Stimpy: So what'll happen? Ren: That's just it. We don't know. Maybe something bad, maybe something good.

broe23
Posts: 903
Joined: Thu Jan 28, 2016 9:35 pm
Location: Central IL
Contact: Website

Re: Rpi on a Windows Network

Sun May 22, 2016 4:28 pm

When I get home, I will upload the samba config that I use. I use Webmin to mount the drive as ext4 that I have connected on the Pi3 I use for MySQL. Along with setting up shares.
Ren: Now listen, Cadet. I've got a job for you. See this button? Ren: Don't touch it! It's the History Eraser button, you fool! Stimpy: So what'll happen? Ren: That's just it. We don't know. Maybe something bad, maybe something good.

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

Re: Rpi on a Windows Network

Sun May 22, 2016 4:41 pm

broe23 wrote:That is because regular Windows does not communicate with NFS. Only the Enterprise editions have NfS capabilities built in.

I have no problems accessing my Pi's through SMB or FTP on the Windows 10 machine or on the Matricom box.

There is no other way but Samba for Windows to see a Linux Server shares.
I think you've missed the fact that he wants to use the RPi to access a Windows share, not use Windows to access a share on the RPi.

broe23
Posts: 903
Joined: Thu Jan 28, 2016 9:35 pm
Location: Central IL
Contact: Website

Re: Rpi on a Windows Network

Mon May 23, 2016 2:11 am

JimmyN wrote:
broe23 wrote:That is because regular Windows does not communicate with NFS. Only the Enterprise editions have NfS capabilities built in.

I have no problems accessing my Pi's through SMB or FTP on the Windows 10 machine or on the Matricom box.

There is no other way but Samba for Windows to see a Linux Server shares.
I think you've missed the fact that he wants to use the RPi to access a Windows share, not use Windows to access a share on the RPi.
I have not missed anything. I have been doing this for a very long time and know what is needed for Linux to communicate with Windows.

You need Samba installed on any Linux install, not just SMBclient. Both SMBD and NMBD have to run. If only using the SD card, they may not start properly when the various services start being enabled. That means that you have to use a SD card for just the Bootloader and an external USB Pocket drive to run the OS. You also need to configure the smb.conf for what shares you plan on sharing to any Windows machine.

Without Samba installed on the Linux machine, you will not be able to connect to Windows SMB/CIFS. It will fail. Now you can use FTP/SFTP with Windows, if you install a FTP Server/Client in Windows that runs as a Service, or use WinSCP to connect to the Linux machine from Windows. You need to install OpenSSH-sftp-server and FTP on the Linux Machine.

I am running on a Pi 3, Debian Lite on a 300GB USB Pocket drive. I use a 1TB as the share from that machine. It is being used as not only a web server, but also for MySQL for databases. If there is more than one machine accessing that server, it will choke, since the Pi is not meant for process intense setups as a multi-device connection server. It will run fine with a light load of one computer accessing it. Also you can notice it choking if you are trying to play back any type of media that requires access to stream the data.

This is my smb.conf for the laptop I am on. I use NFS on my Pi3 to automount my laptop to the NFS Exports on my Pi and Lenovo ix-2.

[global]
; os level = 20
syslog = 0
guest ok = yes
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
username map = /etc/samba/smbusers
obey pam restrictions = yes
unix password sync = yes
max log size = 1000
map to guest = bad user
pam password change = yes
server string = %h server (Samba, Linux Mint)
workgroup = workgroup
usershare allow guests = yes
dns proxy = no
write raw = no
read raw = no
log file = /var/log/samba/log.%m
security = user
panic action = /usr/share/samba/panic-action %d
server role = standalone server
passwd program = /usr/bin/passwd %u
; socket options = tcp_nodelay

[Downloads]
comment = My Downloads
path = /home/gz7916/Downloads
writeable = yes
; browseable = yes
guest ok = yes
Ren: Now listen, Cadet. I've got a job for you. See this button? Ren: Don't touch it! It's the History Eraser button, you fool! Stimpy: So what'll happen? Ren: That's just it. We don't know. Maybe something bad, maybe something good.

Return to “General discussion”