Banana Pi 測試 – ArchLinux 安裝 Samba Server

安裝 Samba Server
# pacman -S samba

修改設定檔
# cp /etc/samba/smb.conf.default /etc/samba/smb.conf
# egrep -v ‘^$|^#|^;’ /etc/samba/smb.conf
[global]
   workgroup = HOME
   server string = Samba Server
   printcap name = /etc/printcap
   load printers = yes
   log file = /var/log/samba/%m.log
   max log size = 50
   security = user
   dns proxy = no
[homes]
   comment = Home Directories
   browseable = no
   writable = yes
[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
   guest ok = no
   writable = no
   printable = yes
[@more@]設定使用者 Samba 密碼
# /usr/bin/pdbedit -a bananapi

測試設定檔是否正確
# /usr/bin/testparm

啟動 Samba Server
# system start smbd
# systemctl start nmbd

設定開機時啟動 Samba Server
# systemctl enable smbd
Created symlink from /etc/systemd/system/multi-user.target.wants/smbd.service to /lib/systemd/system/smbd.service.
# systemctl enable nmbd
Created symlink from /etc/systemd/system/multi-user.target.wants/nmbd.service to /lib/systemd/system/nmbd.service.

檢查是否有正常啟動
# netstat -antulp | egrep  ‘:445|:139|:137|:138’
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      15106/smbd
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      15106/smbd
tcp        0      0 192.168.1.103:445       192.168.1.6:2283        ESTABLISHED 15138/smbd
tcp6       0      0 :::445                  :::*                    LISTEN      15106/smbd
tcp6       0      0 :::139                  :::*                    LISTEN      15106/smbd
udp        0      0 192.168.1.255:137       0.0.0.0:*                           15112/nmbd
udp        0      0 192.168.1.103:137       0.0.0.0:*                           15112/nmbd
udp        0      0 0.0.0.0:137             0.0.0.0:*                           15112/nmbd
udp        0      0 192.168.1.255:138       0.0.0.0:*                           15112/nmbd
udp        0      0 192.168.1.103:138       0.0.0.0:*                           15112/nmbd
udp        0      0 0.0.0.0:138             0.0.0.0:*                           15112/nmbd

在 Windows 7 下測試
在檔案總管下輸入 SambaServer’IPusername

輸入使用者帳號及密碼

可以正常讀寫

其它分享的目錄