forked from cifsd-team/ksmbd-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
98 lines (76 loc) · 2.18 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
________________________
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-devl libnl3-devl
For CentOS:
sudo yum install glib2-devel libnl3-devel
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.