Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:services:nas:ksmbd [2024/01/05 21:36] – [Configuration] add example linus | 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 [[: | ||
| - | You can install **ksmbd** on your system by first installing the '' | ||
| ===== 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 |
| - | ====== Example ====== | + | For command line, the UCI configuration file is located at ''/ |
| - | Assume you have [[docs: | + | ==== Example ==== |
| - | In this example | + | This example |
| + | Multiple devices and shares may be added by providing a '' | ||
| + | |||
| + | To access storage anonymously | ||
| < | < | ||
| - | chown -R nobody: | + | chown -R nobody: |
| </ | </ | ||
| - | Then we can configure our shares in ''/ | + | 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 | ||
| < | < | ||
| config globals | config globals | ||
| option workgroup ' | option workgroup ' | ||
| - | option description 'Ksmbd on My-Device' | + | option description 'Ksmbd on OpenWrt' |
| option interface ' | option interface ' | ||
| Line 33: | Line 66: | ||
| option create_mask ' | option create_mask ' | ||
| option dir_mask ' | option dir_mask ' | ||
| + | </ | ||
| - | config share | + | 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: \\ |
| - | option name ' | + | As of this commit https://github.com/ |
| - | option path '/mnt/sdb1' | + | For versions below 24.10 you have to manually edit the template and adjust the values accordingly. |
| - | option read_only 'no' | + | < |
| - | option guest_ok ' | + | #smb2 max read = 512K |
| - | option create_mask ' | + | #smb2 max write = 512K |
| - | option dir_mask ' | + | #smb2 max trans = 512K |
| </ | </ | ||
| + | |||
| ===== Global section ===== | ===== Global section ===== | ||
| The '' | The '' | ||