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

Difference between revisions of "RockpiE/Samba"

Line 13: Line 13:
  
 
This is a guide to using Samba On ROCK Pi E.
 
This is a guide to using Samba On ROCK Pi E.
 +
 +
=== Preparation ===
 +
 +
Before you start, update your packages including rockchip-fstab, rockchip-overlay, u-boot, kernel. See https://wiki.radxa.com/RockpiE/radxa-apt.
 +
 +
Here we use system image, rockpie_debian_buster_server_arm64_20210126_0056-gpt.
 +
 +
=== Test ===
 +
 +
==== Test one, ROCK Pi E as Server,  Ubuntu 20.04 PC as Client ====
 +
 +
* ROCK Pi E Server
 +
 +
  sudo apt-get install cifs-utils
 +
  sudo apt-get install samba
 +
 +
Add the contents at the end of file, /etc/samba/smb.conf
 +
 +
  [rockpie_share]
 +
  comment = Home Public Folder
 +
  browseable = yes
 +
  path = /home/rock/share
 +
  create mask = 0777
 +
  guest ok = yes
 +
  read only = no
 +
  force user = rock
 +
* Ubuntu 20.04 PC Client
 +
 +
  mkdir -p /data/share
 +
  sudo mount -t cifs //192.168.1.104/rockpie_share /data/share -o guest
 +
  # format: mount -t fstype //Samba-Server-IP/EXPORT-FOLDER Samba-Client-Local-Folder -o guest
 +
  ls /data/rockpie
 +
 +
On PC, in directory /data/rockpie, we can see files shared by ROCK Pi E.
 +
 +
==== Test two, Ubuntu 20.04 PC as Server, ROCK Pi E as Client ====
 +
 +
* Ubuntu 20.04 PC Server
 +
 +
  sudo apt-get install samba
 +
 +
Add the contents at the end of file, /etc/samba/smb.conf
 +
 +
  [smb_share]
 +
  comment = Home Public Folder
 +
  browseable = yes
 +
  path = /home/wzj/share
 +
  create mask = 0777
 +
  guest ok = yes
 +
  read only = no
 +
  force user = wzj
 +
* ROCK Pi E Client
 +
 +
  cd /home/rock
 +
  mkdir smb_share
 +
  sudo mount -t cifs //192.168.1.105/smb_share /home/rock/smb_share -o guest
 +
  # format: mount -t fstype //Samba-Server-IP/EXPORT-FOLDER Samba-Client-Local-Folder -o guest
 +
 +
If you are having trouble in mounting, you can specify the version to as follow:
 +
sudo mount -t cifs //192.168.1.105/smb_share /home/rock/smb_share -o guest,vers=2.0
 +
 +
On ROCK Pi E, in directory /home/rock/smb_share, we can see files shared by Ubuntu 20.04 PC.
 +
 +
=== Troubleshooting ===
 +
 +
* If you have issue with samba and cifs, start a new post on the forum. https://forum.radxa.com/

Revision as of 08:33, 26 September 2021

    ROCK Pi E >  Samba


On ROCK Pi E, 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 E 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 E.

Preparation

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

Here we use system image, rockpie_debian_buster_server_arm64_20210126_0056-gpt.

Test

Test one, ROCK Pi E as Server, Ubuntu 20.04 PC as Client

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

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

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

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

Test two, Ubuntu 20.04 PC as Server, ROCK Pi E as Client

  • Ubuntu 20.04 PC Server
 sudo apt-get install samba

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

 [smb_share]
 comment = Home Public Folder
 browseable = yes
 path = /home/wzj/share
 create mask = 0777
 guest ok = yes
 read only = no
 force user = wzj
  • ROCK Pi E Client
 cd /home/rock
 mkdir smb_share
 sudo mount -t cifs //192.168.1.105/smb_share /home/rock/smb_share -o guest 
 # format: mount -t fstype //Samba-Server-IP/EXPORT-FOLDER Samba-Client-Local-Folder -o guest

If you are having trouble in mounting, you can specify the version to as follow:

sudo mount -t cifs //192.168.1.105/smb_share /home/rock/smb_share -o guest,vers=2.0

On ROCK Pi E, in directory /home/rock/smb_share, we can see files shared by Ubuntu 20.04 PC.

Troubleshooting