His Masters' Voices Wiki

よろずのことの書き残し

ユーザ用ツール

サイト用ツール


nas:readynas_duo_v2_openwrt_samba

**文書の過去の版を表示しています。**

[ReadyNAS Duo v2][OpenWrt] SambaでWindowsファイル共有

概要

基礎知識

手順

samba関連のパッケージを調べる

luci-app-samba4
luci-i18n-samba4-ja
samba4-admin
samba4-client
samba4-libs
samba4-server
samba4-utils 

パッケージをインストール

opkg update
opkg install samba4-server luci-app-samba4 luci-i18n-samba4-ja
/etc/init.d/samba4 enable
/etc/init.d/samba4 start

samba起動させたら、Ubuntuから「OpenWrt」が見えるようになった。
まだ中身はどのファイルも見えませんが。

調べる

初期状態の/etc/config/samba4 の内容(コメント、空行除去)

hiroshi@OpenWrt:/mnt/md3/homes/hiroshi$ sudo cat /etc/config/samba4 | grep -v \# | grep -v ^$
config samba
	option workgroup 'WORKGROUP'
	option charset 'UTF-8'
	option description 'Samba on OpenWRT'
hiroshi@OpenWrt:/mnt/md3/homes/hiroshi$ 

初期状態の/etc/samba/smb.conf.template の内容 (コメント、空行除去)

hiroshi@OpenWrt:/mnt/md3/homes/hiroshi$ cat /etc/samba/smb.conf.template | grep -v \# | grep -v ^$
[global]
	netbios name = |NAME| 
	interfaces = |INTERFACES|
	server string = |DESCRIPTION|
	unix charset = |CHARSET|
	workgroup = |WORKGROUP|
	bind interfaces only = yes
	deadtime = 15
	enable core files = no
	security = user
	invalid users = root
	map to guest = Bad User
	null passwords = yes
	passdb backend = smbpasswd
	socket options = IPTOS_LOWDELAY TCP_NODELAY
	load printers = No
	printcap name = /dev/null
	disable spoolss = yes
	printing = bsd
	mdns name = mdns
	veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/
	delete veto files = yes
hiroshi@OpenWrt:/mnt/md3/homes/hiroshi$ 

これから生成された /etc/samba/smb.conf(/var/etc/smb.confへのリンク)

hiroshi@OpenWrt:/mnt/md3/homes/hiroshi$ cat /etc/samba/smb.conf | grep -v \# | grep -v ^$
[global]
	netbios name = OpenWrt 
	interfaces = eth0 
	server string = Samba on OpenWRT
	unix charset = UTF-8
	workgroup = WORKGROUP
	bind interfaces only = yes
	deadtime = 15
	enable core files = no
	security = user
	invalid users = root
	map to guest = Bad User
	null passwords = yes
	passdb backend = smbpasswd
	socket options = IPTOS_LOWDELAY TCP_NODELAY
	load printers = No
	printcap name = /dev/null
	disable spoolss = yes
	printing = bsd
	mdns name = mdns
	veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/
	delete veto files = yes
hiroshi@OpenWrt:/mnt/md3/homes/hiroshi$ 
nas/readynas_duo_v2_openwrt_samba.1653818284.txt.gz · 最終更新: 2022/05/29 18:58 by nipa28