Treating a RaspberryPi as just another Windows machine
This guide has been superceded by the AutoInstall version http://cymplecy.wordpress.com/2012/08/09/auto-install-a-simple-samba-setup/ but it still shows the process needed to go through 🙂
To access the files on your RPi over your network and to stop worrying about finding its IP address, you need to install and configure something called Samba – but don’t worry- I’ve made this easy peasy
1st off -need to run LXTerminal and then type
[code]sudo apt-get install samba[/code]
(Answer any question it asks with OK or Y)
Once its installed – we need another thing installing – so do this
[code]sudo apt-get install samba-common-bin[/code]
And then run this command
[code]sudo smbpasswd -a pi[/code]
You will be asked to enter the pi password twice – use raspberry as the password.
Finally use
[code]sudo nano /etc/samba/smb.conf[/code]
And copy and paste the following to replace the existing file contents
[code]
#======================= Global Settings =======================
[global]
workgroup = WORKGROUP
server string = mypi server
netbios name = mypi
dns proxy = no
#### Debugging/Accounting ####
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
####### Authentication #######
security = user
map to guest = pi
#======================= Share Definitions =======================
[homes]
comment = Home Directories
browseable = yes
guest ok = yes
read only = no
create mask = 0775
directory mask = 0775
writeable = yes
guest account = pi
[public]
path = /
guest ok = yes
guest account = ftp
browseable = yes
read only = no
create mask = 0777
directory mask = 0777
writeable = yes
admin users = everyone
[/code]
Save the file in nano (Ctrl-O, answer Y and then Ctrl-X) and finally issue the following command
[code]sudo /etc/init.d/samba restart[/code]
Your RPi should now be set to be reffered to as \mypi from any windows machine on the same network.
You will be asked to logon the 1st time you use it after every computer restart – just use username pi password raspberry
If you wish to change the name of your RPi to say darkstar then just replace mypi with darkstar in the server name and netbios name lines
Flippin’ glorious. Works perfectly!
Works like a dream, thanks saved me searching google on how to do it 🙂
Well, I’ve done plenty with samba and windows networking (I use a Debian file server to windows clients at home), and this should work, just by looking at your config. The other available option is to just use security = share. That works best if you have multiple shares with different permissions. One thing to note is that if you have different NetBIOS and DNS names, your server won’t be accessible by “mypi” if the client you’re connecting from doesn’t have NetBIOS support (i.e, most out of the box linux installs). Of course, in that instance, you could just use the DNS name (raspbian).
“The other available option is to just use security = share”
I couldn’t read/write the pi folder when I did that – please send me an smb.conf that works with that and I’ll be very happy 🙂
One thing to note is that if you have different NetBIOS and DNS names, your server won’t be accessible by “mypi” if the client you’re connecting from doesn’t have NetBIOS support (i.e, most out of the box linux installs). Of course, in that instance, you could just use the DNS name (raspbian).”
Good point 🙂 Where is the DNS name held and I’ll change that as well 🙂
In order to make the pi directory writable if “security = share”, you need to add “admin users = pi” (without quotes) under the options where you’re defining the share.
To change the dns hostname of the raspberry pi, follow the instructions in this video:
http://www.youtube.com/watch?v=8mirU5kKFjE
Changing security = share and addding admin users = pi didn’t work for me – could you post a working smb.conf with securitiy =share please 🙂
you are a genius 😀 thanks
worked like a treat thanks Mate 🙂
used lots of guides with problems this one worked perfectly many thanks
Thanks so much, went through about 3 tutorials which went off on one and didn’t work for me, but this works great