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/04/26 12:54] – [Configuration] linus | docs:guide-user:services:nas:ksmbd [2024/12/11 13:48] – [Example] sppmaster | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| ===== Installation ===== | ===== Installation ===== | ||
| - | To use ksmbd with [[docs: | + | To use ksmbd with [[docs: |
| - | If you are sharing a USB or eSATA drive from your device on your LAN, make sure you also install the drivers and filesystem | + | If you are sharing a USB or eSATA drive make sure you also install the drivers and filesystem outlined |
| ===== 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 ==== | ==== Example ==== | ||
| - | Assume | + | This example assumes |
| + | Multiple devices | ||
| - | In this example we will access | + | To access storage anonymously over the LAN using the '' |
| < | < | ||
| - | 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 38: | 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 '' | ||