User Tools

Site Tools

This documentation is no longer maintained by the Turris team (although it can be used by the community to share content). The current official documentation is at docs.turris.cz.

Samba for network shared folders

This is How to install and setup package Samba4 on your Turris Omnia device.

Install samba package

  • In reFortis go to Package management - Packages - in section NAS check Samba and save it.
  • After installation notification reboot your device to see changes in LuCI.

Now you should have two new entries in LuCI menu Services. HDD Idle and Network shares for your Samba v4.

Mount point

LuCI - System - Mount Points

Make shure you have disk enabled (checked) in section Mount Points, remember destination. Default is /srv. Apply changes.

Create folders to share

Let's say your device have adress 192.168.0.1 and you want to have two shared folders: private, public. Your terminal commands will be:

 ssh root@192.168.0.1
 
 cd /srv
 mkdir samba
 cd samba
 
 mkdir private public
 chmod -R 777 private
 chmod -R 777 public

By now your data will be stored in drive at destinations:

  • /srv/samba/private/
  • /srv/samba/public/

Setup samba page in LuCI

 Services - Network shares

General Settings

  • Interface will be mostly LAN
  • Workgroup default is WORKGROUP
  • Description can be any text as you wish. For me: Samba on Turris Omnia

Check fileds you can leave all empty.

Shared directories

  • name: private
  • path: /srv/samba/private/
  • browseable: checked
  • allowed users: root
  • Inherit owner: checked
  • create mask: 0666
  • directory mask: 0777
  • name: public
  • path: /srv/samba/public/
  • browseable: checked
  • guests only: checked
  • Inherit owner: checked
  • create mask: 0666
  • directory mask: 0777

Other fileds will be unchecked. Apply changes.

Edit template

Make sure, logging with root user is allowed. Line must be commented:

 ## set invalid users
 #invalid users = root

Create samba password

For you to log-in at private folder, you need in this stage setup password for samba account root.

 ssh root@192.168.0.1
 smbpasswd -a root

You will be prompted to enter and re-enter desired samba password.

Start and autostart of Samba share

 LuCI - System - Startup

Find line “samba4” and press button Start to run apllication.

For autostart on system boot press button Disabled, it will change on green Enabled.

Test connection

Linux

Open file manager, go to Others and in destination path enter:

 smb://192.168.0.1

To browse folder public, just press enter to log in as Annonymous user without password.

To browse folder private, enter credentials:

  • user: root
  • workgroup: WORKGROUP
  • and your samba password

Windows

Same as for Linux, but in first step your path will be:

 \\192.168.0.1

Now you have your network shared folders ready to use.

Archive of tutorial for Samba 3 and older versions

Open the Network Shares page:

Create the shared directory:

Place a # before the invalid users = root line to disable the restriction on the root user:

Add the root user to the list of users that can access the Samba share:

  # smbpasswd -a root
  New SMB password:
  Retype new SMB password:
  

OS X

Press ⌘K the Samba share:

Supply credentials:

References