差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
| linux:samba:setting [2022/05/29 02:00] – [Samba の設定] ともやん | linux:samba:setting [2025/10/12 17:00] (現在) – [トラブルシューティング] ともやん | ||
|---|---|---|---|
| 行 265: | 行 265: | ||
| wide links = yes | wide links = yes | ||
| </ | </ | ||
| + | </ | ||
| + | |||
| + | DietPi の設定例\\ | ||
| + | <WRAP prewrap 100% mincode_long> | ||
| + | <code autoconf / | ||
| + | [global] | ||
| + | unix extensions = no | ||
| + | |||
| + | # UIDとGIDについてUNIX属性の値が反映されるようにする | ||
| + | # | ||
| + | |||
| + | # Samba 高速化 | ||
| + | #socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 SO_KEEPALIVE | ||
| + | socket options = TCP_NODELAY SO_KEEPALIVE TCP_KEEPIDLE=120 TCP_KEEPINTVL=10 TCP_KEEPCNT=5 | ||
| + | #max protocol = SMB2 | ||
| + | # workgroup = WORKGROUP | ||
| + | workgroup = MONSTERS-G | ||
| + | server string = %h server | ||
| + | dns proxy = no | ||
| + | log file = / | ||
| + | max log size = 1000 | ||
| + | syslog only = no | ||
| + | syslog = 0 | ||
| + | |||
| + | panic action = / | ||
| + | |||
| + | security = user | ||
| + | encrypt passwords = true | ||
| + | passdb backend = tdbsam | ||
| + | obey pam restrictions = yes | ||
| + | unix password sync = yes | ||
| + | |||
| + | passwd program = / | ||
| + | passwd chat = *Enter\snew\s*\spassword: | ||
| + | pam password change = yes | ||
| + | map to guest = bad user | ||
| + | |||
| + | load printers = no | ||
| + | printcap name = /dev/null | ||
| + | disable spoolss = yes | ||
| + | |||
| + | [homes] | ||
| + | | ||
| + | # | ||
| + | | ||
| + | # read only = yes | ||
| + | read only = no | ||
| + | |||
| + | [DataShare] | ||
| + | comment = Data Share | ||
| + | path = / | ||
| + | browseable = yes | ||
| + | read only = no | ||
| + | wide links = yes | ||
| + | |||
| + | [dietpi] | ||
| + | comment = DietPi Share | ||
| + | path = / | ||
| + | browseable = yes | ||
| + | create mask = 0664 | ||
| + | directory mask = 0775 | ||
| + | valid users = dietpi | ||
| + | writeable = yes | ||
| + | max connections = 2 | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== シンボルリンクを辿る設定 ===== | ||
| + | ^ 設定項目 | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | |||
| + | ===== トラブルシューティング ===== | ||
| + | |||
| + | ==== smb.conf に wide links = yes を設定するとファイル共有にアクセスできない😥 ==== | ||
| + | <WRAP mincode> | ||
| + | <code autoconf / | ||
| + | |||
| + | #### Debugging/ | ||
| + | |||
| + | # This tells Samba to use a separate log file for each machine | ||
| + | # that connects | ||
| + | log file = / | ||
| + | |||
| + | [DataShare] | ||
| + | comment = Data Share | ||
| + | path = / | ||
| + | browseable = yes | ||
| + | read only = no | ||
| + | wide links = yes | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | samba のログを確認する🤔\\ | ||
| + | <WRAP color_term> | ||
| + | <WRAP color_command>< | ||
| + | $ sudo tail -f / | ||
| + | </ | ||
| + | <WRAP color_result>< | ||
| + | <b class=RED> | ||
| + | make_connection_snum: | ||
| + | [2022/05/29 03: | ||
| + | Error loading module '/ | ||
| + | [2022/05/29 03: | ||
| + | error probing vfs module ' | ||
| + | [2022/05/29 03: | ||
| + | smbd_vfs_init: | ||
| + | [2022/05/29 03: | ||
| + | make_connection_snum: | ||
| + | </ | ||
| + | </ | ||
| + | **widelinks.so** が見つからないのでモジュールがロード出来ていない😱\\ | ||
| + | |||
| + | **widelinks.so** は **samba-vfs-modules** パッケージに含まれる。\\ | ||
| + | <WRAP color_term> | ||
| + | <WRAP color_command>< | ||
| + | $ apt-file search widelinks.so | ||
| + | </ | ||
| + | <WRAP color_result>< | ||
| + | samba-vfs-modules: | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | **samba-vfs-modules** パッケージをインストールするとファイル共有にアクセス可能になる🥰\\ | ||
| + | <WRAP color_term> | ||
| + | <WRAP color_command>< | ||
| + | $ sudo apt install samba-vfs-modules | ||
| + | </ | ||
| + | <WRAP color_result>< | ||
| + | Reading package lists... Done | ||
| + | Building dependency tree... Done | ||
| + | Reading state information... Done | ||
| + | The following additional packages will be installed: | ||
| + | liburing1 | ||
| + | Recommended packages: | ||
| + | libcephfs2 libgfapi0 | ||
| + | The following NEW packages will be installed: | ||
| + | liburing1 samba-vfs-modules | ||
| + | 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. | ||
| + | Need to get 466 kB of archives. | ||
| + | After this operation, 1,549 kB of additional disk space will be used. | ||
| + | Do you want to continue? [Y/n] y | ||
| + | Get:1 http:// | ||
| + | Get:2 http:// | ||
| + | Fetched 466 kB in 3s (166 kB/s) | ||
| + | debconf: delaying package configuration, | ||
| + | Selecting previously unselected package liburing1: | ||
| + | (Reading database ... 70828 files and directories currently installed.) | ||
| + | Preparing to unpack .../ | ||
| + | Unpacking liburing1: | ||
| + | Selecting previously unselected package samba-vfs-modules: | ||
| + | Preparing to unpack .../ | ||
| + | Unpacking samba-vfs-modules: | ||
| + | Setting up liburing1: | ||
| + | Setting up samba-vfs-modules: | ||
| + | Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u2) ... | ||
| + | </ | ||
| </ | </ | ||