[LINUX] Mastering OpenWRT (LEDE): Until sharing samba as NAS

Introduction

OpenWRT / LEDE is a Linux distribution for wireless routers, As a tip when operating as a NAS, Leave some information about the samba settings.

The tips for installing OpenWRT / LEDE on the Chinese NAS kit BS-U35WF are as follows.

-Use Chinese fanless NAS with OpenWRT (LEDE)

Reference:

-NAS (aka Network Attached Storage): OpenWRT Official Tips -Install Hogepiyo wiki Samba

samba install It's basically the same as Hogepiyo's wiki. The only difference is the Japanese version of the web interface luci-app.

root@LEDE:~# opkg list | grep samba
luci-app-samba - git-19.271.72080-7b230b0-1 - Network Shares - Samba SMB/CIFS module
・ ・ ・
luci-i18n-samba-ja - git-19.271.72080-7b230b0-1 - Translation for luci-app-samba -Japanese(Japanese)
・ ・ ・
samba36-client - 3.6.25-8 - Samba 3.6 SMB/CIFS client
samba36-server - 3.6.25-8 - The Samba software suite is a collection of programs that implements the SMB protocol for UNIX systems, allowing you to serve files and printers to Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred to as the LanManager or Netbios protocol.

root@LEDE:~# opkg install samba36-server luci-app-samba luci-i18n-samba-ja

home creation

openWRT / LEDE is not even created by default, so create it.

root@LEDE:/# cd /mnt/sda1
root@LEDE:/mnt/sda1# mkdir home
root@LEDE:/# ln -s /mnt/sda1/home/ /home

If you can't connect to samba well

In my case, even though samba started properly, I couldn't connect successfully from the outside. In conclusion, not /etc/samba/smb.conf You need to modify /etc/samba/smb.conf.template.

/etc/samba/smb.conf.template


root@LEDE:~# vi /etc/samba/smb.conf.template
      interfaces = |INTERFACES|
↓
#      interfaces = |INTERFACES|
	bind interfaces only = no

Add guest account

In the case of home NAS operation, when operating a family shared directory, etc., operate with a guest account.

/etc/samba/smb.conf.template


	guest account = nobody

Symbolic link measures

If you want to follow a symlink from a public directory, The following settings are required.

/etc/samba/smb.conf.template


	unix extensions = no
	wide links = yes

Settings from luci-app

The settings for /etc/samba/smb.conf.template so far are It can also be set via the GUI luci-app. image.png

Recommended Posts

Mastering OpenWRT (LEDE): Until sharing samba as NAS
Mastering OpenWRT (LEDE): rtorrent
Mastering OpenWRT (LEDE): LINE Notify
Use Chinese fanless NAS with OpenWRT (LEDE)