Sabtu, 01 Oktober 2016

Share OS windows on Raspberry SAMBA

How to install Samba

To install samba on Rasberry Pi simply run the following commands
pi@raspberrypi:~ $ sudo apt update
pi@raspberrypi:~ $ sudo apt-get install samba

Configuring Samba

Edit the samba configuration file /etc/samba/smb.conf
pi@raspberrypi:~ $ sudo nano /etc/samba/smb.conf
Change the workgroup name to the name of your workgroup. To find out the workgroup name on Windows 7 PC go to Control Panel → System. On a system running Windows 10 you can find this onSettings → System → About
You can also enable your Raspberry Pi as a WINS server by changing the entry wins support to yes
workgroup = MYWORKGROUP
wins support = yes
Replace MYWORKGROUP with the name of your workgroup. Save and exit the file.

Create shared folder

Create the folder that you want to share and setup appropriate permission. In this example we will create a folder and give read, write, execute permissions to owner, group and other users.
pi@raspberrypi:~ $ mkdir /home/pi/shared
pi@raspberrypi:~ $ chmod 777 /home/pi/shared
Edit the /etc/samba/smb.conf file and add the following lines. These lines define the behaviour of the shared folder so you can call them share definition.
[pishare]
  comment = Pi Shared Folder
  path = /home/pi/shared
 browsable = yes
 guest ok = yes
 writable = yes
Save and exit the file. The following table explains the meaning of each entry in the share definition.
[pishare]This is the name of the share
comment = Pi Shared FolderThe text Pi Shared FOlder is the text that is displayed as Comments in shares detail view
path = /home/pi/sharedSpecifies the folder that contains the files to be shared
browsable = yesSet this share to be visible when you run the net view command and also when you browse the network shares.
writable = yesAllows user to add/modify files and folders in this share. By the default samba shares are readonly
guest ok = yesAllows non authenticated users access the share

Accessing the shares from a Windows machine

  • Open File Explorer.
  • Click network from the left-hand menu.
  • From the list of computers double click RASPBERRYPI (if you haven't change the default hostname)
  • You will be see the shared folder pishare. As is it writeable share you can add files to this shared folder from both Windows and Raspberry Pi.


reff: http://www.opentechguides.com/how-to/article/raspberry-pi/86/shared-folder-windows.html

Tidak ada komentar:

Posting Komentar