Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:services:nas:ksmbd [2022/07/29 16:55] – created rmilecki | docs:guide-user:services:nas:ksmbd [2024/12/11 13:48] – [Example] sppmaster | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== ksmbd ====== | ====== ksmbd ====== | ||
| - | [[https://www.kernel.org/ | + | [[https://docs.kernel.org/ |
| + | |||
| + | ===== Installation ===== | ||
| + | |||
| + | To use ksmbd with [[docs: | ||
| + | |||
| + | If you are sharing a USB or eSATA drive make sure you also install the drivers and filesystem outlined on the Samba [[: | ||
| ===== Configuration ===== | ===== Configuration ===== | ||
| - | The UCI configuration file is located at ''/ | ||
| - | Some options are hardcoded in the ''/ | + | In LuCI, go to Services -> Network Shares. Here you can assign the interface, name the shares, and path to the drive folder, e.g. / |
| + | |||
| + | For command line, the UCI configuration file is located at ''/ | ||
| + | |||
| + | ==== Example ==== | ||
| + | |||
| + | This example assumes you have a [[docs: | ||
| + | Multiple devices and shares may be added by providing a '' | ||
| + | |||
| + | To access storage anonymously over the LAN using the '' | ||
| + | |||
| + | < | ||
| + | chown -R nobody: | ||
| + | </ | ||
| + | |||
| + | To access a shared storage over the LAN using a **username** and **password** you have to use '' | ||
| + | |||
| + | < | ||
| + | root@OpenWrt: | ||
| + | Usage: ksmbd.adduser [-v] [-P PWDDB] [-c CONF] [-a | -u | -d] [-p PWD] USER | ||
| + | |||
| + | If neither `-a', `-u', nor `-d' is given, either add or update USER. | ||
| + | USER must be UTF-8 and [1, 48) bytes. | ||
| + | USER cannot contain colon (`:' | ||
| + | |||
| + | -a, --add add USER to user database | ||
| + | -u, --update | ||
| + | -d, --delete | ||
| + | -p, --password=PWD | ||
| + | PWD must be UTF-8 and [0, 129) bytes | ||
| + | -P, --pwddb=PWDDB | ||
| + | `/ | ||
| + | -C, --config=CONF | ||
| + | `/ | ||
| + | -v, --verbose | ||
| + | -V, --version | ||
| + | -h, --help | ||
| + | |||
| + | See ksmbd.adduser(8) for more details. | ||
| + | </ | ||
| + | |||
| + | Configure shares in LuCI → Services → Network Shares or by editing ''/ | ||
| + | |||
| + | < | ||
| + | config globals | ||
| + | option workgroup ' | ||
| + | option description 'Ksmbd on OpenWrt' | ||
| + | option interface ' | ||
| + | |||
| + | config share | ||
| + | option name ' | ||
| + | option path '/ | ||
| + | option read_only ' | ||
| + | option guest_ok ' | ||
| + | option create_mask ' | ||
| + | option dir_mask ' | ||
| + | </ | ||
| + | |||
| + | On devices with sufficient RAM (typically >256MB) performance can be improved, increase or comment out the preset buffer limits in LuCI -> Services -> Network Shares -> Edit Template. Save and apply: \\ | ||
| + | As of this commit https:// | ||
| + | For versions below 24.10 you have to manually edit the template and adjust the values accordingly. | ||
| + | < | ||
| + | #smb2 max read = 512K | ||
| + | #smb2 max write = 512K | ||
| + | #smb2 max trans = 512K | ||
| + | </ | ||
| ===== Global section ===== | ===== Global section ===== | ||