Difference between revisions of "RockpiE/Samba"
(→Test) |
|||
(3 intermediate revisions by the same user not shown) | |||
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. | ||
+ | |||
+ | Your devices need to be on the same network segment. | ||
+ | |||
+ | === Test === | ||
+ | |||
+ | ==== Test one, ROCK Pi E as Server, Ubuntu 20.04 PC or Windows 10 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 | ||
+ | |||
+ | Every time you modify this configuration file, you need to restart the service. | ||
+ | sudo systemctl restart smbd nmbd | ||
+ | * 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. | ||
+ | |||
+ | * Windows 10 PC Client | ||
+ | Open your file explorer, and add you ROCK Pi E service like tihs: | ||
+ | |||
+ | [[File:Samba-win10-01.jpeg]] | ||
+ | |||
+ | and then, you can see files shared by ROCK Pi E. | ||
+ | |||
+ | [[File:Samba-win10-02.jpeg]] | ||
+ | |||
+ | |||
+ | ==== 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 | ||
+ | |||
+ | Every time you modify this configuration file, you need to restart the service. | ||
+ | sudo systemctl restart smbd nmbd | ||
+ | |||
+ | * 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/c/rockpie |
Latest revision as of 06:14, 27 September 2021
ROCK Pi E > Samba
Contents
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.
Your devices need to be on the same network segment.
Test
Test one, ROCK Pi E as Server, Ubuntu 20.04 PC or Windows 10 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
Every time you modify this configuration file, you need to restart the service.
sudo systemctl restart smbd nmbd
- 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.
- Windows 10 PC Client
Open your file explorer, and add you ROCK Pi E service like tihs:
and then, you 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
Every time you modify this configuration file, you need to restart the service.
sudo systemctl restart smbd nmbd
- 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/c/rockpie