“Since 1992, Samba has provided secure, stable and fast file and print services for all clients using the SMB/CIFS protocol, such as all versions of DOS and Windows, OS/2, Linux and many others.” - samba.org

NOTE: Setting up and administering Samba on your groov EPIC is only for advanced developers who are familiar with both Linux shell commands and network administration. Once you enable Secure Shell access, you are on your own and will have to solve any issues that arise through your own knowledge and online research. Opto 22 product support is limited to helping you reset the groov EPIC processor to factory defaults; our Product Support engineers cannot help you with programming, usage, or troubleshooting.

CAUTION: Before updating groov EPIC firmware, be sure you back up any files or applications you have created, including files you have shared, as they will be deleted during the update. In addition, be aware that when you update EPIC firmware, your installation and Samba server setup will not be restored. You will need to repeat the steps in this guide after you have updated the firmware.

Installing Samba

  1. Log into shell and use apt to update the package repositories.
  2. Use apt to install samba.

Configuring Samba

A large part of configuring Samba is setting up a Linux user on the system that will share and access the file area.
Best practice dictates that this is NOT the same as the secure shell user.

  1. Add the user via SSH.
    sudo useradd [your-username]
    sudo passwd [your-username]

  2. Configure Samba.
    Move through this file carefully, making note of any changes you make. For example, you might like to comment out the section on Printers.
    sudo nano /etc/samba/smb.conf

  3. At the bottom of the file, add the following example:

    [EPIC]
        comment = EPIC file space
        path = /home/dev/unsecured
        read only = No
        guest ok = Yes

  4. Add the Linux user from step 1 to the Samba password list:
    sudo smbpasswd -a [your-username]

  5. Start the Samba application by entering the following two lines:
    sudo /usr/sbin/smbd -D -s /etc/samba/smb.conf
    sudo /usr/sbin/nmbd -D -l /var/log/samba -s /etc/samba/smb.conf

Adding EPIC firewall rules and mapping to EPIC

  1. Open groov Manage and choose Home > Security > Firewall.

  2. Set up a new rule covering ports 137, 138, 139, and 445. Use the range “137:139” for the first three ports:
        Title: Samba
        Protocol: tcp/udp
        Ports: 137:139 and 445
        eth0, tun0: enabled
        eth1, wlan0: disabled

  3. Go to a Windows PC and right click on My PC in File Explorer. Select Map Network Drive and enter the groov EPIC details where the folder is \\[host]\EPIC, replacing [host] with your device hostname or IP address. Enter the username and password that you created for the user and added to Samba.

Troubleshooting hints

Use the command testparm to see what Samba configuration is being used.
View the logs at /var/log/samba.
If you make any changes to the smb.cnf file, you need to restart Samba using the following two commands (both and in order):
sudo /usr/sbin/smbd -D -s /etc/samba/smb.conf
sudo /usr/sbin/nmbd -D -l /var/log/samba -s /etc/samba/smb.conf

Top

EPIC Developer Overview Home