Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Enzo Matsumiya <ematsumiya@suse.de>
To: linux-cifs@vger.kernel.org, linkinjeon@kernel.org
Cc: senozhatsky@chromium.org, sergey.senozhatsky@gmail.com,
	hyc.lee@gmail.com, smfrench@gmail.com,
	Enzo Matsumiya <ematsumiya@suse.de>
Subject: [PATCH 9/9] README: change to markdown, updates for ksmbdctl
Date: Sun,  6 Mar 2022 22:33:44 -0300	[thread overview]
Message-ID: <20220307013344.29064-10-ematsumiya@suse.de> (raw)
In-Reply-To: <20220307013344.29064-1-ematsumiya@suse.de>

Change README to markdown format.

Includes instructions for openSUSE.

Updates instructions for ksmbdctl (single binary).

Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
---
 README    | 100 ------------------------------------------------------
 README.md |  57 ++++++++++++++++---------------
 2 files changed, 30 insertions(+), 127 deletions(-)
 delete mode 100644 README

diff --git a/README b/README
deleted file mode 100644
index c64b75c58c2f..000000000000
--- a/README
+++ /dev/null
@@ -1,100 +0,0 @@
-________________________
-BUILDING KSMBD TOOLS
-________________________
-
-Install preprequisite packages:
-	For Ubuntu:
-	sudo apt-get install autoconf libtool pkg-config libnl-3-dev \
-	libnl-genl-3-dev libglib2.0-dev
-
-	For Fedora, RHEL:
-	sudo yum install autoconf automake libtool glib2-devel libnl3-devel
-
-	For CentOS:
-	sudo yum install glib2-devel libnl3-devel
-
-ksmbd-tools.spec should serve as a base template for RPM packagers.
-
-Build steps:
-        - cd into the ksmbd-tools directory
-        - ./autogen.sh
-        - ./configure
-        - make
-        - make install
-
-_____________________
-USING KSMBD TOOLS
-_____________________
-
-Setup steps:
-	- install smbd kernel driver
-		modprobe ksmbd
-	- create user/password for SMB share
-		mkdir /etc/ksmbd/
-		ksmbd.adduser -a <Enter USERNAME for SMB share access>
-		Enter password for SMB share access
-	- create /etc/ksmbd/smb.conf file, add SMB share in smb.conf file
-		Refer smb.conf.example
-	- start smbd user space daemon
-		ksmbd.mountd
-	- access share from Windows or Linux using CIFS
-
-_____________________
-RESTART KSMBD
-_____________________
-
-steps:
-	- kill user and kernel space daemon
-		sudo ksmbd.control -s
-	- restart user space daemon
-		ksmbd.mountd
-
-_____________________
-Shutdown KSMBD
-_____________________
-
-steps:
-	- kill user and kernel space daemon
-		sudo ksmbd.control -s
-	- unload ksmbd module
-		rmmod ksmbd
-
-
-_____________________
-Enable debug prints
-_____________________
-
-steps:
-	- Enable all component prints
-		sudo ksmbd.control -d "all"
-	- Enable one of components(smb, auth, vfs, oplock, ipc, conn, rdma)
-		sudo ksmbd.control -d "smb"
-	- Disable prints:
-		If you try the selected component once more, It is disabled without brackets.
-
-
---------------------
-ADMIN TOOLS
---------------------
-
-- ksmbd.adduser
-	Adds, updates or removes (-a/-u/-d) a user from ksmbd pwd file.
-
-- ksmbd.addshare
-	Adds, updates or removes (-a/-u/-d) a net share from smb.conf file.
-
-Usage example:
-
-Creating a new share:
-
-ksmbd.addshare -a files -o "\
-		     path=/home/users/files \
-		     comment=exported files \
-		     writeable=yes \
-		     read only = no \
-		     "
-
-Note that share options (-o) must always be enquoted ("...").
-
-ksmbd.addshare tool does not modify [global] smb.conf section; only net
-share configs are supported at the moment.
diff --git a/README.md b/README.md
index 7156c2e20dee..1e8fceb11e23 100644
--- a/README.md
+++ b/README.md
@@ -5,16 +5,17 @@
 ##### Install prerequisite packages:
 
 - For Ubuntu:
-  - `sudo apt-get install autoconf libtool pkg-config libnl-3-dev libnl-genl-3-dev libglib2.0-dev`
+  - `sudo apt-get install autoconf libtool pkg-config libnl-3-dev libnl-genl-3-dev libglib2.0-dev libkrb5-dev`
 
 - For Fedora, RHEL:
-  - `sudo yum install autoconf automake libtool glib2-devel libnl3-devel`
+  - `sudo yum install autoconf automake libtool glib2-devel libnl3-devel krb5-devel`
 
 - For CentOS:
-  - `sudo yum install glib2-devel libnl3-devel`
+  - `sudo yum install glib2-devel libnl3-devel krb5-devel`
 
 - For openSUSE:
-  - `sudo zypper install glib2-devel libnl3-devel`
+  - `sudo zypper install glib2-devel libnl3-devel krb5-devel`
+
 
 ##### Building:
 
@@ -32,31 +33,31 @@ All administration tasks must be done as root.
 
 ##### Setup:
 
-- Install ksmbd kernel driver
+- Install ksmbd kernel driver (requires CONFIG_SMB_SERVER=y)
 	- `modprobe ksmbd`
 - Create user/password for SMB share
 	- `mkdir /etc/ksmbd`
-	- `ksmbd.adduser -a <username>`
-	- Enter password for SMB share access
+	- `ksmbdctl user add <username>`
+	- Enter password for user when prompted
 - Create `/etc/ksmbd/smb.conf` file
 	- Refer `smb.conf.example`
 - Add share to `smb.conf`
-	- This can be done manually or with `ksmbd.addshare`, e.g.:
-	- `ksmbd.addshare -a myshare -o "guest ok = yes, writable = yes, path = /mnt/data"`
+	- This can be done either manually or with `ksmbdctl`, e.g.:
+	- `ksmbdctl share add myshare -o "guest ok = yes, writable = yes, path = /mnt/data"`
 
 	- Note: share options (-o) must always be enclosed with double quotes ("...").
 - Start ksmbd user space daemon
-	- `ksmbd.mountd`
-- Access share from Windows or Linux using CIFS
+	- `ksmbdctl daemon start`
+- Access share from Windows or Linux
 
 
 ##### Stopping and restarting the daemon:
 
-First, kill user and kernel space daemon
-  - `ksmbd.control -s`
+First, kill user and kernel space daemon:
+  - `ksmbdctl daemon shutdown`
 
 Then, to restart the daemon, run:
-  - `ksmbd.mountd`
+  - `ksmbdctl daemon start`
 
 Or to shut it down completely:
   - `rmmod ksmbd`
@@ -64,25 +65,27 @@ Or to shut it down completely:
 
 ### Debugging
 
-- Enable all component prints
-  - `ksmbd.control -d "all"`
-- Enable a single component (see below)
-  - `ksmbd.control -d "smb"`
-- Run the command with the same component name again to disable it
+- Enable debugging all components
+  - `ksmbdctl daemon debug "all"`
+- Enable debugging a single component (see more below)
+  - `ksmbdctl daemon debug "smb"`
+- Run the commands above with the same component name again to disable it
 
 Currently available debug components:
 smb, auth, vfs, oplock, ipc, conn, rdma
 
 
-### More...
+### User management
 
-- ksmbd.adduser
-  - Adds (-a), updates (-u), or deletes (-d) a user from user database.
-  - Default database file is `/etc/ksmbd/users.db`
+- ksmbdctl user
+  - Adds, updates, deletes, or lists users from database.
+  - Default database file is `/etc/ksmbd/users.db`, but can be changed with '-d'
+    option.
 
-- ksmbd.addshare
-  - Adds (-a), updates (-u), or deletes (-d) a net share from config file.
-  - Default config file is `/etc/ksmbd/smb.conf`
+- ksmbdctl share
+  - Adds, updates, deletes, or lists net shares from config file.
+  - Default config file is `/etc/ksmbd/smb.conf`, but can be changed with '-c'
+    option.
 
-`ksmbd.addshare` does not modify `[global]` section in config file; only net
+`ksmbdctl share add` does not modify `[global]` section in config file; only net
 share configs are supported at the moment.
-- 
2.34.1


  parent reply	other threads:[~2022-03-07  1:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07  1:33 [PATCH 0/9] Unify all programs into a single binary "ksmbdctl" Enzo Matsumiya
2022-03-07  1:33 ` [PATCH 1/9] ksmbd-tools: rename dirs to reflect new commands Enzo Matsumiya
2022-03-07  1:33 ` [PATCH 2/9] ksmbd-tools: move control functions to daemon Enzo Matsumiya
2022-03-07  1:33 ` [PATCH 3/9] ksmbd-tools: use quotes for local includes Enzo Matsumiya
2022-03-07  1:33 ` [PATCH 4/9] share: introduce share_cmd Enzo Matsumiya
2022-03-10  2:19   ` Namjae Jeon
2022-03-07  1:33 ` [PATCH 5/9] user: introduce user_cmd Enzo Matsumiya
2022-03-10  2:17   ` Namjae Jeon
2022-03-07  1:33 ` [PATCH 6/9] daemon: introduce daemon_cmd Enzo Matsumiya
2022-03-07  1:33 ` [PATCH 7/9] daemon/rpc_samr: drop unused function rpc_samr_remove_domain_entry() Enzo Matsumiya
2022-03-07  1:33 ` [PATCH 8/9] Unify all programs into a single binary "ksmbdctl" Enzo Matsumiya
2022-03-07  1:33 ` Enzo Matsumiya [this message]
2022-03-10  2:11 ` [PATCH 0/9] " Namjae Jeon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220307013344.29064-10-ematsumiya@suse.de \
    --to=ematsumiya@suse.de \
    --cc=hyc.lee@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=smfrench@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox