---
name: "ksmbd.addshare"
section: "8"
platform: "linux"
package: "ksmbd-tools"
version: "3.5.3-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ksmbd.addshare"
---

# ksmbd.addshare(8)

configure shares for ksmbd.conf of ksmbd.mountd

## NAME

ksmbd.addshare - configure shares for ksmbd.conf of ksmbd.mountd

## SYNOPSIS

**ksmbd.addshare** \[-v\] \[-C *CONF*\] \[-P *PWDDB*\] \[-a \| -u \| -d\] \[-o *OPT*\]... *SHARE*

## DESCRIPTION

**ksmbd.addshare** configures shares for [**ksmbd.conf**(5)](/ksmbd.conf/5.md) configuration file of [**ksmbd.mountd**(8)](/ksmbd.mountd/8.md) user mode daemon. **ksmbd.addshare** modifies **ksmbd.conf** such that its existing formatting is not retained. **ksmbd.addshare** can parse [**ksmbdpwd.db**(5)](/ksmbdpwd.db/5.md) user database so as to provide completions when prompting. **ksmbd.addshare** notifies **ksmbd.mountd** of changes if it had made any. **ksmbd.addshare** will only make changes that do not require restarting **ksmbd.mountd** and **ksmbd** to take effect.

## OPTIONS

If neither **-a**, **-u**, nor **-d** is given, either add or update *SHARE*. *SHARE* must be UTF-8 and \[1, 64) bytes.  *SHARE* is case-insensitive.

- **-a**, **--add**

  Add *SHARE* to configuration file.

- **-u**, **--update**

  Update *SHARE* in configuration file.

- **-d**, **--delete**

  Delete *SHARE* from configuration file.

- **-o**, **--option**=*OPT*

  Use *OPT* as share parameter instead of prompting. This option can be given multiple times.

- **-C**, **--config**=*CONF*

  Use *CONF* as configuration file instead of **/etc/ksmbd/ksmbd.conf**.

- **-P**, **--pwddb**=*PWDDB*

  Use *PWDDB* as user database instead of **/etc/ksmbd/ksmbdpwd.db**.

- **-v**, **--verbose**

  Be verbose.

- **-V**, **--version**

  Output version information and exit.

- **-h**, **--help**

  Display this help and exit.

## EXIT STATUS

The exit status is 0 on success and 1 on failure. Failure to notify **ksmbd.mountd** of changes has no effect on exit status.

## COPYRIGHT

Copyright © 2015-2022 ksmbd-tools contributors. License GPLv2: GNU GPL version 2 \<https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html\>.\
 This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

## REPORTING BUGS

For bug reports, use the issue tracker at https://github.com/cifsd-team/ksmbd-tools/issues.

## SEE ALSO

- **Configuration File**

  [**ksmbd.conf**(5)](/ksmbd.conf/5.md)

- **User Database**

  [**ksmbdpwd.db**(5)](/ksmbdpwd.db/5.md)

- **Utilities**

  [**ksmbd.adduser**(8)](/ksmbd.adduser/8.md), [**ksmbd.control**(8)](/ksmbd.control/8.md), [**ksmbd.mountd**(8)](/ksmbd.mountd/8.md)
