Search by Tags

SMB support

 

Article updated at 02 Sep 2020
Compare with Revision


Subscribe for this article updates

CIFS or Samba Support to Access/Mount Windows Network Shares.

Installation

From Package Manager (opkg)

Install the required packages:

opkg update
opkg install cifs-utils libsmbclient0 samba

Please note that the cifs-utils package is unfortunately not currently available in any Ångström feed and needs to be built as per our OpenEmbedded (core) article instructions.

Attention: OPKG support was last supported on BSP 2.8. If you need a samba client starting BSP 3.0, consider adding this through Torizon containers or through an OpenEmbedded build.

From OpenEmbedded Build

Follow the OpenEmbedded (core) article and make sure you are able to build and deploy at least the reference image for our BSP.

Add samba and cifs-utils to your local.conf:

local.conf
IMAGE_INSTALL_append = " samba cifs-utils"

In-kernel Support

Optionally verify in-kernel Cifs Support

root@colibri_t20:~# cat /proc/filesystems | grep cifs
nodev   cifs

SMB2.0 and SMB3.1

Support for later versions of SMB needs to be enabled on the kernel. You can check if your current build has the options enabled with:

zcat /proc/config.gz | grep CONFIG_CIFS_*
# CONFIG_CIFS_SMB2 is not set

To support this, enable the following options on the kernel:

CONFIG_CIFS_SMB2
CONFIG_CIFS_SMB311

Note: CONFIG_CIFS_SMB2 allows SMB3 connections as well. Note: Official support for SMB3.1 was added in kernel 4.17, available starting BSP 5.0.

Smbclient

Allows easy access of any Windows share similar to e.g. an FTP server:

root@colibri_t20:~# smbclient --user=<user> //<server>/<share>
Enter <user>'s password: 
Domain=[YOURDOMAIN] OS=[Unix] Server=[Samba x.y.z]
smb: \> 

Mounting

Seamless access on a file basis is possible through in-kernel cifs file system driver as follows (Note: requires kernel cifs support as outlined above):

root@colibri_t20:~# mount.cifs //<server>/<share> /mnt/net -o user=<user>
Password: