Guide - Setting up a SMB(Windows) file server - Printable Version

+- PINE64 (
+-- Forum: ROCK64 (
+--- Forum: Rock64 Tutorials (
+--- Thread: Guide - Setting up a SMB(Windows) file server (/showthread.php?tid=4983)

Guide - Setting up a SMB(Windows) file server - Ptheven - 08-21-2017

This quick and easy tutorial will show you how to set up a shared folder on your Rock64 and host it via SMB/CIFS to share it amongst Windows/Mac/Linux Clients. 

I will also show you how to connect to it using Googles Android client. 


Rock64 Board running Linux , Connected via Ethernet or Wifi

Know the IP address/Hostname of your board, SSH access. 

Basic knowledge of how to use the linux terminal


An external drive to host the Shared Directory

Basic understanding of how linux handles USB drives and File Permissions


I will continue this tutorial off from the last one, and I will set up the shared directory in the Flash drive. 

Firstly, you'll need to update your repositories and install any pending updates. This is good practise before installing software on any linux system. Debian/Ubuntu use the "apt" package management tool. You'll need superuser access for this. 

sudo apt update && sudo apt upgrade 

Type in your password when prompted and 'y' when prompted to install updates. 

After that, you'll need to invoke apt to install the samba server: 

sudo apt install samba samba-common-bin

[Image: t8pJbWu.png?1]

Depending on your distro, samba-common-bin may already be installed. However, allow the other supporting software to be installed. 

The next step is to create a directory to host the network share. In this senario, I will be placing it in the Flash drive mentioned in the tutorial listed at the top. 

Navigate to your mounted FS location. Following the previous tutorial, for me it is: 

cd /media/USB-test3/

Make a new directory which will act as the shared location. We will create it with Use/Write/Execute permissions for everybody inside the folder: 

sudo mkdir -m 1777 RockShare

Now we can edit Samba's configuration file to create a new share based on the directory we just set up: 

sudoedit /etc/samba/smb.conf

[Image: ZB2fLBd.png?1]

Use the Up/Down or PageUp/Down keys to navigate to the bottom of the file to create a new entry.

Comment = Rock64 Share
Path = /media/USB-test3/RockShare
Browseable = yes
Writeable = Yes
only guest = no
create mask = 0777
directory mask = 0777
Public = yes
Guest ok = yes

[Image: 7hKk4mK.png?1]

These options means that anybody can read, write or execute files in the share, either with a samba user or as a guest. To forbid guest access, simply omit the "guest ok" line. 

Now we can create a specialized user for samba, if you'd like to have your share accessible only with the proper credentials. 

First of all, you need to make a new linux user. In this case, I will be making a new user "rocksmb": 

sudo useradd rocksmb

After that, you can create a new samba user, and you'll be prompted to type in a password too. This is a unique password, independent to your linux user password: 

sudo smbpasswd -a rocksmb
New SMB password:
Retype new SMB password:
Added user rocksmb.

Now you restart the samba service: 

sudo /etc/init.d/samba restart
[ ok ] Restarting nmbd (via systemctl): nmbd.service.
[ ok ] Restarting smbd (via systemctl): smbd.service.
[ ok ] Restarting samba-ad-dc (via systemctl): samba-ad-dc.service.

Now your Samba share will be visible and accessible! 

There are many guides about how to access smb shares using Windows:

Mac OS:


In all cases, replace the hostname/IP in the guide with the ones you have. 


If you want to access the drive using mobile apps, there are many apps available on both Android and iOS. 



I dont have an iphone, so I'll do a quick rundown using the android app: 

Download it and upen it to be greeted to a very simple credential screen. Simply fill in the details like:


In our case: 

[Image: ZBN8LZA.png]

Assuming you've put in the right credentials, it will immediately open up the share using the default android file selector: 

[Image: uW5A7bx.png]

However Google's app is VERY rudimentary and barebones. I was able to open image files, but video and audio files gave me problems unless I copied them to internal memory. 

If you need something more full featured, I highly recommend solid explorer: