sudo apt-get update
 sudo apt-get install samba samba-common-bin
 reboot
 sudo nano /etc/samba/smb.conf
 ==========解決網路電腦名稱未出現:在 HEAD 的位置==========
 [global]
 netbios name = RPi-File-Server # 區域網路顯示的主機名稱
 workgroup = WORKGROUP
 wins support = yes
 ==========基本設定:放在最後面==========
 [PiShare]
  comment=Raspberry Pi Share
  path=/home/pi/share
  browseable=Yes
  writeable=Yes
  only guest=no
  create mask=0777
  directory mask=0777
  public=yes
 ==========解決沒有登入權限:連接上行==========
  force user = pi
 ==========在終端機重啟 SAMBA===========
 sudo service samba restart

———- 二個設定範例 (實作中,我先設定權限全開)———- How-To: Share a folder with a Windows computer from a Raspberry Pi https://raspberrypihq.com/how-to-share-a-folder-with-a-windows-computer-from-a-raspberry-pi/

----------Raspberry Pi 架Samba Server 化身網路上的芳鄰----------

http://thinker-evans.blogspot.com/2015/10/raspberry-pi-samba-server_23.html

==========NOTE==========

sudo smbpasswd -a pi
(And enter pi’s password twice. default: raspberry)
(You may set as none, Enter twice.)

[公開分享]
    comment = 簡易分享,匿名登入
    path = /media/Data1
    public = yes
    browseable = yes
    writable = yes
    create mask = 0776
    directory mask = 0776
    force user = pi

==========解決網路電腦名稱未出現==========
———-Raspberry Pi 的實作 – 讓 Linux、Windows、OSX 分享檔案的 File Server———-
[global]
netbios name = RPi-File-Server # 區域網路顯示的主機名稱

http://blog.itist.tw/2014/05/samba.html

———-中文教學 (有設定權限)———-
https://blog.gtwang.org/iot/raspberry-pi/raspberry-pi-samba-setup-tutorial/

==========在終端機重啟 SAMBA===========
sudo service samba restart

==========檔案權限詳解===========