{"id":13755709,"url":"https://github.com/namjaejeon/ksmbd-tools","last_synced_at":"2025-10-25T03:45:44.225Z","repository":{"id":39333454,"uuid":"48567390","full_name":"namjaejeon/ksmbd-tools","owner":"namjaejeon","description":"ksmbd kernel server userspace utilities","archived":false,"fork":false,"pushed_at":"2025-10-23T07:30:18.000Z","size":1397,"stargazers_count":60,"open_issues_count":11,"forks_count":46,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-10-23T09:26:17.162Z","etag":null,"topics":["cifs","file-server","filesystem","network-file-system","server","smb","smb3","tool","util"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/namjaejeon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-12-25T05:12:40.000Z","updated_at":"2025-10-23T07:30:22.000Z","dependencies_parsed_at":"2023-02-09T12:15:23.060Z","dependency_job_id":"e7bb1a75-e043-450c-9715-ed4fd036659d","html_url":"https://github.com/namjaejeon/ksmbd-tools","commit_stats":null,"previous_names":["namjaejeon/cifsd-tools"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/namjaejeon/ksmbd-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namjaejeon%2Fksmbd-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namjaejeon%2Fksmbd-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namjaejeon%2Fksmbd-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namjaejeon%2Fksmbd-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/namjaejeon","download_url":"https://codeload.github.com/namjaejeon/ksmbd-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/namjaejeon%2Fksmbd-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280901489,"owners_count":26410586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cifs","file-server","filesystem","network-file-system","server","smb","smb3","tool","util"],"created_at":"2024-08-03T11:00:25.749Z","updated_at":"2025-10-25T03:45:44.191Z","avatar_url":"https://github.com/namjaejeon.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# ksmbd-tools\n\n[![Build Status](https://app.travis-ci.com/cifsd-team/ksmbd-tools.svg?branch=master)](https://app.travis-ci.com/cifsd-team/ksmbd-tools)\n[![License](https://img.shields.io/badge/License-GPL_v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)\n\n[ksmbd-tools](https://github.com/cifsd-team/ksmbd-tools)\nis a collection of userspace utilities for\n[the ksmbd kernel server](https://www.kernel.org/doc/html/latest/filesystems/smb/ksmbd.html)  \nmerged to mainline in the Linux 5.15 release.\n\n## Table of Contents\n\n- [Building and Installing](#building-and-installing)\n- [Usage](#usage)\n- [Packages](#packages)\n\n## Building and Installing\n\nYou should first check if your distribution has a package for ksmbd-tools,  \nand if that is the case, consider installing it from the package manager.  \nOtherwise, follow these instructions to build it yourself. Either the GNU  \nAutotools or Meson build system can be used.\n\nDependencies for Debian and its derivatives: `git` `gcc` `pkgconf` `autoconf`  \n`automake` `libtool` `make` `meson` `ninja-build` `gawk` `libnl-3-dev`  \n`libnl-genl-3-dev` `libglib2.0-dev`\n\nDependencies for RHEL and its derivatives: `git` `gcc` `pkgconf` `autoconf`  \n`automake` `libtool` `make` `meson` `ninja-build` `gawk` `libnl3-devel`  \n`glib2-devel`\n\nExample build and install:\n```sh\ngit clone https://github.com/cifsd-team/ksmbd-tools.git\ncd ksmbd-tools\n\n# autotools build\n\n./autogen.sh\n./configure --with-rundir=/run\n\nmake\nsudo make install\n\n# meson build\n\nmkdir build\ncd build\nmeson -Drundir=/run ..\n\nninja\nsudo ninja install\n```\n\nBy default, the utilities are in `/usr/local/sbin` and the files they use by  \ndefault are under `/usr/local/etc` in the `ksmbd` directory.\n\nIf you would like to install ksmbd-tools under `/usr`, where it may conflict  \nwith ksmbd-tools installed using the package manager, give `--prefix=/usr`  \nand `--sysconfdir=/etc` as options to `configure` or `meson`. In that case,  \nthe utilities are in `/usr/sbin` and the files they use by default are under  \n`/etc` in the `ksmbd` directory.\n\nIt is likely that you should give `--with-rundir` or `-Drundir` as an option  \nto `configure` or `meson`, respectively. This is due to it being likely that  \nyour system does not mount a tmpfs filesystem at the directory given by the  \ndefault value. Common choices are `/run`, `/var/run`, or `/tmp`. ksmbd-tools  \nuses the directory for per-process modifiable data, namely the `ksmbd.lock`  \nfile holding the PID of the `ksmbd.mountd` manager process. If your autoconf  \nsupports it, you may instead choose to give `--runstatedir` to `configure`.\n\nIf you have systemd and it meets at least the minimum version required, the  \nbuild will install the `ksmbd.service` unit file. The unit file supports the  \nusual unit commands and handles loading of the kernel module. Note that the  \nlocation of the unit file may conflict with ksmbd-tools installed using the  \npackage manager. You can bypass the version check and choose the unit file  \ndirectory yourself by giving `--with-systemdsystemunitdir=DIR` or  \n`-Dsystemdsystemunitdir=DIR` as an option to either `configure` or `meson`,  \nrespectively.\n\n## Usage\n\nManual pages:\n```sh\nman 8 ksmbd.addshare\nman 8 ksmbd.adduser\nman 8 ksmbd.control\nman 8 ksmbd.mountd\nman 5 ksmbd.conf\nman 5 ksmbdpwd.db\n```\n\nExample session:\n```sh\n# If you built and installed ksmbd-tools yourself using autoconf defaults,\n# the utilities are in `/usr/local/sbin',\n# the default user database is `/usr/local/etc/ksmbd/ksmbdpwd.db', and\n# the default configuration file is `/usr/local/etc/ksmbd/ksmbd.conf'.\n\n# Otherwise it is likely that,\n# the utilities are in `/usr/sbin',\n# the default user database is `/etc/ksmbd/ksmbdpwd.db', and\n# the default configuration file is `/etc/ksmbd/ksmbd.conf'.\n\n# Create the share path directory.\n# The share stores files in this directory using its underlying filesystem.\nmkdir -vp $HOME/MyShare\n\n# Add a share to the default configuration file.\n# Note that `ksmbd.addshare' does not do variable expansion.\n# Without `--add', `ksmbd.addshare' will update `MyShare' if it exists.\nsudo ksmbd.addshare --add \\\n                    --option \"path = $HOME/MyShare\" \\\n                    --option 'read only = no' \\\n                    MyShare\n\n# The default configuration file now has a new section for `MyShare'.\n#\n# [MyShare]\n#         ; share parameters\n#         path = /home/tester/MyShare\n#         read only = no\n#\n# Each share has its own section with share parameters that apply to it.\n# A share parameter given in `[global]' changes its default value.\n# `[global]' also has global parameters which are not share specific.\n\n# You can interactively update a share by omitting `--option'.\n# Without `--update', `ksmbd.addshare' will add `MyShare' if it does not exist.\nsudo ksmbd.addshare --update MyShare\n\n# Add a user to the default user database.\n# You will be prompted for a password.\nsudo ksmbd.adduser --add MyUser\n\n# There is no system user called `MyUser' so it has to be mapped to one.\n# We can force all users accessing the share to map to a system user and group.\n\n# Update share parameters of a share in the default configuration file.\nsudo ksmbd.addshare --update \\\n                    --option \"force user = $USER\" \\\n                    --option \"force group = $USER\" \\\n                    MyShare\n\n# The default configuration file now has the updated share parameters.\n#\n# [MyShare]\n#         ; share parameters\n#         force group = tester\n#         force user = tester\n#         path = /home/tester/MyShare\n#         read only = no\n#\n\n# Add the kernel module.\nsudo modprobe ksmbd\n\n# Start the user and kernel mode daemons.\n# All interfaces are listened to by default.\nsudo ksmbd.mountd\n\n# Mount the new share with cifs-utils and authenticate as the new user.\n# You will be prompted for the password given previously with `ksmbd.adduser'.\nsudo mount -o user=MyUser //127.0.0.1/MyShare /mnt\n\n# You can now access the share at `/mnt'.\nsudo touch /mnt/new_file_from_cifs_utils\n\n# Unmount the share.\nsudo umount /mnt\n\n# Update the password of a user in the default user database.\n# `--password' can be used to give the password instead of prompting.\nsudo ksmbd.adduser --update --password MyNewPassword MyUser\n\n# Delete a user from the default user database.\nsudo ksmbd.adduser --delete MyUser\n\n# The utilities notify ksmbd.mountd of changes by sending it the SIGHUP signal.\n# This can be done manually when changes are made without using the utilities.\nsudo ksmbd.control --reload\n\n# Toggle ksmbd debug printing of the `smb' component.\nsudo ksmbd.control --debug smb\n\n# Some changes require restarting the user and kernel mode daemons.\n# Modifying any global parameter is one example of such a change.\n# Restarting means starting `ksmbd.mountd' after shutting the daemons down.\n\n# Shutdown the user and kernel mode daemons.\nsudo ksmbd.control --shutdown\n\n# Remove the kernel module.\nsudo modprobe -r ksmbd\n```\n\n## Packages\n\nThe following packaging status tracker is provided by\n[the Repology project](https://repology.org)\n.\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/ksmbd-tools.svg)](https://repology.org/project/ksmbd-tools/versions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamjaejeon%2Fksmbd-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamjaejeon%2Fksmbd-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamjaejeon%2Fksmbd-tools/lists"}