Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Rockpi4/Samba

< Rockpi4
Revision as of 08:12, 24 September 2021 by Ken (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
    ROCK Pi 4 >  Samba


On ROCK Pi 4, it is a common necessity to use Samba, which allows file and print sharing between Unix/Linux and Windows machines on the LAN.

Also, ROCK Pi 4 supports Common Internet File System (CIFS). CIFS, a file-sharing protocol, provides an open and cross-platform mechanism for requesting network server files and services.

This is a guide to using Samba On ROCK Pi 4.

Preparation

Before you start, update your packages including rockchip-fstab, rockchip-overlay, u-boot, kernel. See https://wiki.radxa.com/Rockpi4/radxa-apt.

Here we use system image, rockpi4_debian_stretch_lxde_armhf_20181105_2120-gpt.img.

Test

Test one, ROCK Pi 4 as Server, Ubuntu 16.04 PC as Client

  • ROCK Pi 4 Server
 sudo apt-get install cifs-utils
 sudo apt-get install samba

Add the contents at the end of file, /etc/samba/smb.conf

 [rockpi4_share]
 comment = Home Public Folder
 browseable = yes
 path = /home/linaro/share
 create mask = 0777
 guest ok = yes
 read only = no
 force user = linaro
  • Ubuntu 16.04 PC Client
 mkdir -p /data/rockpi4
 sudo mount -t cifs //192.168.1.8/rockpi4_share /data/rockpi4 -o guest
 # format: mount -t fstype //Samba-Server-IP/EXPORT-FOLDER Samba-Client-Local-Folder -o guest
 ls /data/rockpi4

On PC, in directory /data/rockpi4, we can see files shared by ROCK Pi 4.

Test two, Ubuntu 16.0 PC as Server, ROCK Pi 4 as Client

  • Ubuntu 16.0 PC Server
 sudo apt-get install samba

Add the contents at the end of file, /etc/samba/smb.conf

 [sandara_share]
 comment = Home Public Folder
 browseable = yes
 path = /data/sandara_share
 create mask = 0777
 guest ok = yes
 read only = no
 force user = xxx
  • ROCK Pi 4 Client
 cd /home/linaro
 mkdir sandara
 sudo mount -t cifs //192.168.1.100/sandara_share /home/linaro/sandara -o guest 
 # format: mount -t fstype //Samba-Server-IP/EXPORT-FOLDER Samba-Client-Local-Folder -o guest

On ROCK Pi 4, in directory /home/linaro/sandara, we can see files shared by Ubuntu 16.04 PC.

Troubleshooting