ech0
Posts: 27
Joined: Tue Apr 03, 2012 11:24 am

Samba: Mount windows folder

Wed Jul 04, 2012 8:48 pm

I've been trying to access my windows folder on the raspberry for quite a while without managing it.
I right clicked, properties, share the windows folder called "Files".

Then I went on the Raspberry Pi and tried various commands such as Run ->
smb ://192.168.0.14/Files
smbmount ://192.168.0.14/Files
smbmount //Desktop-PC/Files

I tried accessing it in the file manager with the local IP, tried finding a /shared folder on the raspi but can't find that either.

I'd appreciate any help possible to set this up

Thanks in advance guys!
Michael

nickon314
Posts: 116
Joined: Tue Jul 03, 2012 12:11 pm
Location: West Yorkshire

Re: Samba: Mount windows folder

Thu Jul 05, 2012 3:43 am

I have managed to mount a windows directory using a command line 'mount' command.

I can't remember the exact command, but it involves something like "mount -t cifs xxxx".

'cifs' is the directory type.
I also needed to add a username and pasword to the command, and the IP address of the windows PC.

If you are still stuck I can dig out the exact command I used later.


Regards

Nick

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: Samba: Mount windows folder

Thu Jul 05, 2012 6:05 am

try this

mount -t cifs -o username=<username>,password=<password> //<ip>/<path> /<localdirectory>

Replacing all the <>s with the relevant details.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

ech0
Posts: 27
Joined: Tue Apr 03, 2012 11:24 am

Re: Samba: Mount windows folder

Thu Jul 05, 2012 12:35 pm

SirLagz wrote:try this

mount -t cifs -o username=<username>,password=<password> //<ip>/<path> /<localdirectory>

Replacing all the <>s with the relevant details.
Didn't work

I get the same result as I would get with the command mount -h

obarthelemy
Posts: 1407
Joined: Tue Aug 09, 2011 10:53 pm

Re: Samba: Mount windows folder

Thu Jul 05, 2012 1:35 pm

I think there's some weirdness in Windows 7/Vista sharing that throws non-windows PCs a bit off. Sorry, I don't remember specifics ^^ Fixable though.

mikerr
Posts: 2801
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Samba: Mount windows folder

Thu Jul 05, 2012 3:11 pm

Attaching to a windows XP share called "temp" containing a file hello.txt

Make a directory to hold it, and mount it there:

Code: Select all

mkdir /tmp/windows
sudo mount -t cifs -o username=administrator,password=secret1  //192.168.1.4/temp /tmp/windows
Now access that folder like any other in linux:

Code: Select all

ls /tmp/windows/
hello.txt
Android app - Raspi Card Imager - download and image SD cards - No PC required !

mikerr
Posts: 2801
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Samba: Mount windows folder

Thu Jul 05, 2012 4:17 pm

..that's under wheezy image if it makes any difference.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

ech0
Posts: 27
Joined: Tue Apr 03, 2012 11:24 am

Re: Samba: Mount windows folder

Thu Jul 05, 2012 4:28 pm

mikerr wrote:Attaching to a windows XP share called "temp" containing a file hello.txt

Make a directory to hold it, and mount it there:

Code: Select all

mkdir /tmp/windows
sudo mount -t cifs -o username=administrator,password=secret1  //192.168.1.4/temp /tmp/windows
Now access that folder like any other in linux:

Code: Select all

ls /tmp/windows/
hello.txt
I'm afraid that still doesn't work for me, it just prints out the mount -h command, explaining the usage of the mount command.

samuelellis
Posts: 27
Joined: Wed Jul 04, 2012 10:25 pm

Re: Samba: Mount windows folder

Thu Jul 05, 2012 5:36 pm

I know this is a link to an Ubuntu page but it does a good job of explaining mounting of shares on Linux


https://help.ubuntu.com/community/Mount ... ermanently


As it looks like the Debian and Ubuntu share the same method of dealing with shares this may be some help to you

gkmanning
Posts: 5
Joined: Sun Jun 17, 2012 10:23 am

Re: Samba: Mount windows folder

Thu Jul 05, 2012 9:45 pm

Under debian make sure you have the smbclient package

Code: Select all

sudo apt-get install smbclient
Check that you can see the windows share (replace <WindowsPCNetBiosName> with the appropriate PC name)

Code: Select all

smbclient -L //<WindowsPCNetBiosName>
then the information provide in the earlier posts should work. You might need to provide the -o options as in the previous posts if you username on the Rpi doesn't match that of the PC username.

stevep
Posts: 71
Joined: Sat Dec 24, 2011 10:12 am

Re: Samba: Mount windows folder

Thu Jul 05, 2012 10:45 pm

As far as I can work out Samba doesn't work properly, especially with the Wheezy install. I struggled with for some time and eventually got it to work, after trying and failing with the e-linux tutorial. The key bit for me was to accidentally delete my smb.conf file, and then writing a new one from various bits found at random on the net. I'm no closer to understanding what was wrong with the e-linux tutorial or what I did right, but I can now transfer files between the Pi and my Mac and vice versa. Here's the thread (along with my working smb.conf file):
http://www.raspberrypi.org/phpBB3/viewt ... =27&t=8784

User avatar
LetHopeItsSnowing
Posts: 357
Joined: Sat May 26, 2012 6:40 am
Location: UK
Contact: Website

Re: Samba: Mount windows folder

Wed Jul 11, 2012 10:28 am

I has some problems connecting to a windows share and my NAS drive from the Raspberry Pi. Most of my issues just came down to incorrect config. I posted some instructions on my blog (to save my sanity next time I needed to do it!), they might be useful for you http://stuffaboutcode.blogspot.co.uk/20 ... share.html

LHIS
"am I getting slower, or is stuff more complicated; either way I now have to write it down - stuffaboutcode.com"

xfx
Posts: 24
Joined: Thu Dec 06, 2012 10:09 pm

Re: Samba: Mount windows folder

Mon Dec 31, 2012 12:08 am

mikerr's solution worked great for me.
Thank you!

Return to “Beginners”