nas:readynas_duo_v2_openwrt_samba
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
nas:readynas_duo_v2_openwrt_samba [2022/05/28 21:49] – nipa28 | nas:readynas_duo_v2_openwrt_samba [2022/06/03 20:10] (現在) – [Web画面で設定] nipa28 | ||
---|---|---|---|
行 2: | 行 2: | ||
====== | ====== | ||
+ | 概要 | ||
+ | --- | ||
+ | |||
+ | |||
+ | |||
+ | 基礎知識 | ||
+ | ------- | ||
+ | |||
+ | https:// | ||
+ | |||
+ | |||
+ | |||
+ | 手順 | ||
+ | ---- | ||
+ | |||
+ | |||
+ | ### samba関連のパッケージを調べる | ||
``` | ``` | ||
行 13: | 行 30: | ||
``` | ``` | ||
+ | ### パッケージをインストール | ||
``` | ``` | ||
行 24: | 行 41: | ||
samba起動させたら、Ubuntuから「OpenWrt」が見えるようになった。 | samba起動させたら、Ubuntuから「OpenWrt」が見えるようになった。 | ||
まだ中身はどのファイルも見えませんが。 | まだ中身はどのファイルも見えませんが。 | ||
- | {{: | + | {{: |
+ | {{: | ||
+ | |||
+ | |||
+ | ### 調べる | ||
+ | |||
+ | 初期状態の/ | ||
+ | |||
+ | ``` | ||
+ | hiroshi@OpenWrt:/ | ||
+ | config samba | ||
+ | option workgroup ' | ||
+ | option charset ' | ||
+ | option description 'Samba on OpenWRT' | ||
+ | hiroshi@OpenWrt:/ | ||
+ | |||
+ | ``` | ||
+ | |||
+ | 初期状態の/ | ||
+ | |||
+ | ``` | ||
+ | hiroshi@OpenWrt:/ | ||
+ | [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 = / | ||
+ | delete veto files = yes | ||
+ | hiroshi@OpenWrt:/ | ||
+ | ``` | ||
+ | |||
+ | これから生成された / | ||
+ | |||
+ | ``` | ||
+ | hiroshi@OpenWrt:/ | ||
+ | [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 = / | ||
+ | delete veto files = yes | ||
+ | hiroshi@OpenWrt:/ | ||
+ | |||
+ | ``` | ||
+ | |||
+ | ### 設定ファイルを変更 | ||
+ | |||
+ | / | ||
+ | |||
+ | ``` | ||
+ | hiroshi@OpenWrt:/ | ||
+ | hiroshi@OpenWrt:/ | ||
+ | < | ||
+ | hiroshi@OpenWrt:/ | ||
+ | config samba | ||
+ | option workgroup ' | ||
+ | option charset ' | ||
+ | option description 'Samba on OpenWRT' | ||
+ | config sambashare | ||
+ | option guest_only ' | ||
+ | option create_mask ' | ||
+ | option dir_mask ' | ||
+ | option force_root ' | ||
+ | option name ' | ||
+ | option inherit_owner ' | ||
+ | option guest_ok ' | ||
+ | option read_only ' | ||
+ | option path '/ | ||
+ | hiroshi@OpenWrt:/ | ||
+ | |||
+ | ``` | ||
+ | |||
+ | |||
+ | samba4を再起動 | ||
+ | |||
+ | ``` | ||
+ | hiroshi@OpenWrt:/ | ||
+ | hiroshi@OpenWrt:/ | ||
+ | ``` | ||
+ | |||
+ | こんな感じに、設定ファイル/ | ||
+ | [share]セクションが追加された。 | ||
+ | |||
+ | ``` | ||
+ | hiroshi@OpenWrt:/ | ||
+ | [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 = / | ||
+ | delete veto files = yes | ||
+ | [share] | ||
+ | path = / | ||
+ | force user = root | ||
+ | force group = root | ||
+ | create mask = 0666 | ||
+ | directory mask = 0777 | ||
+ | read only = no | ||
+ | guest ok = yes | ||
+ | guest only = yes | ||
+ | inherit owner = yes | ||
+ | vfs objects = io_uring | ||
+ | hiroshi@OpenWrt:/ | ||
+ | |||
+ | ``` | ||
+ | |||
+ | |||
+ | ### ファイル共有を試行(どこかおかしい) | ||
+ | |||
+ | WindowsPC のエクスプローラーから `\\192.168.10.2` に接続すると share フォルダが見えるようになった。 | ||
+ | {{: | ||
+ | |||
+ | ただ、shareフォルダに入って、適当なファイルを作成して保存しようとすると “応答なし” になってしまいフリーズするようだ。 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | どこかに問題が潜んでいるらしい。 | ||
+ | 設定が間違っていて書き込み権限が無いとかかなあ: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ファイル自体は作成されているんだけど、中身が書き込めないみたい。なんでだろ:?: | ||
+ | |||
+ | ### もう少しかかりそう | ||
+ | |||
+ | Sambaについてちゃんと勉強しよう。 | ||
+ | Samba4になって、従来(samba3)とは設定方法が変わっている部分が多くらしい。 | ||
+ | ネット上に数多くあるsambaの記事は、samba3を対象に書かれたものが多く、samba4には当てはまらないので気をつける必要がある。 | ||
+ | |||
+ | のんびりやります。 | ||
+ | |||
+ | |||
+ | 手順(luci) | ||
+ | ==== | ||
+ | |||
+ | ### Web画面で設定 | ||
+ | |||
+ | そういえば、WebのUI LuCI でもSambaの設定ができることを思い出した。 | ||
+ | |||
+ | よくは分からなかったが、とりあえず次の二つをチェックしてみた。 | ||
+ | マスクの数値も変えてみた。(これが適切かどうかは分からないが、家の中で私しか使わないのでテキトーで) | ||
+ | |||
+ | {{: | ||
+ | {{: | ||
+ | |||
+ | すると、shareディレクトリに保存できるようになった。 | ||
+ | なんだか拍子抜け。 | ||
+ | でも、まあ、よかったよかった。 | ||
+ | {{: | ||
+ | |||
+ | 速度もこれだけ出ているようで、まあ満足です。(有線GbE接続) | ||
+ | {{: | ||
nas/readynas_duo_v2_openwrt_samba.1653742146.txt.gz · 最終更新: 2022/05/28 21:49 by nipa28