KSMB and network share ( usb key )

hi, sorry i need your help, i try to configure network storage on my router openwrt ( linksys EA8300 openwrt 19.07 ).

i try to explain step by step my install :

1 / install mount point and usb reconezing software
2/ install ntsf support format ( and ntsf 3g )
3/ install samba 36, and fail to use,
4/ unistall samba36 and install Ksmbd: 3.3.9 Kmod: 3.1.1
5/ fail to found, on windows, and install wsdd2

ok, now i look on my windows "openWRT network"

but ....

my config openwrt :

my actual setting try :

[global]
	netbios name = |NAME| 
	interfaces = |INTERFACES|
	server string = |DESCRIPTION|
	unix charset = |CHARSET|
	workgroup = |WORKGROUP|

	## This global parameter allows the Samba admin to limit what interfaces on a machine will serve SMB requests.
	bind interfaces only = yes

	## time for inactive connections to-be closed in minutes
	deadtime = 15

	## disable core dumps
	enable core files = no

	## set security (auto, user, domain, ads)
	security = user

	## This parameter controls whether a remote client is allowed or required to use SMB encryption.
	## It has different effects depending on whether the connection uses SMB1 or SMB2 and newer:
    ## If the connection uses SMB1, then this option controls the use of a Samba-specific extension to the SMB protocol introduced in Samba 3.2 that makes use of the Unix extensions.
	## If the connection uses SMB2 or newer, then this option controls the use of the SMB-level encryption that is supported in SMB version 3.0 and above and available in Windows 8 and newer. 
	## (default/auto,desired,required,off)
	#smb encrypt = default

	## set invalid users
	invalid users = root

	## map unknow users to guest
	map to guest = Bad User

	## allow client access to accounts that have null passwords. 
	null passwords = yes

	## The old plaintext passdb backend. Some Samba features will not work if this passdb backend is used. (NOTE: enabled for size reasons)
	## (tdbsam,smbpasswd,ldapsam)
	passdb backend = smbpasswd

	## Set location of smbpasswd ('smbd -b' will show default compiled location)
	#smb passwd file = /etc/samba/smbpasswd 

	## LAN (IPTOS_LOWDELAY TCP_NODELAY) WAN (IPTOS_THROUGHPUT) WiFi (SO_KEEPALIVE) try&error for buffer sizes (SO_RCVBUF=65536 SO_SNDBUF=65536)
	socket options = IPTOS_LOWDELAY TCP_NODELAY

	## If this integer parameter is set to a non-zero value, Samba will read from files asynchronously when the request size is bigger than this value.
	## Note that it happens only for non-chained and non-chaining reads and when not using write cache.
	## The only reasonable values for this parameter are 0 (no async I/O) and 1 (always do async I/O).
	## (1/0)
	#aio read size = 0
	#aio write size = 0

	## If Samba has been built with asynchronous I/O support, Samba will not wait until write requests are finished before returning the result to the client for files listed in this parameter.
	## Instead, Samba will immediately return that the write request has been finished successfully, no matter if the operation will succeed or not.
	## This might speed up clients without aio support, but is really dangerous, because data could be lost and files could be damaged. 
	#aio write behind = /*.tmp/

	## lower CPU useage if supported and aio is disabled (aio read size = 0 ; aio write size = 0)
	## is this still broken? issue is from 2019 (NOTE: see https://bugzilla.samba.org/show_bug.cgi?id=14095 )
	## (no, yes)
	#use sendfile = yes

	## samba will behave as previous versions of Samba would and will fail the lock request immediately if the lock range cannot be obtained.
	#blocking locks = No

	## disable loading of all printcap printers by default (iprint, cups, lpstat)
	load printers = No
	printcap name = /dev/null

	## Enabling this parameter will disable Samba's support for the SPOOLSS set of MS-RPC's.
	disable spoolss = yes

	## This parameters controls how printer status information is interpreted on your system.
	## (BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX, SOFTQ)
	printing = bsd

	## Disable that nmbd is acting as a WINS server for unknow netbios names
	#dns proxy = No

	## win/unix user mapping backend
	#idmap config * : backend = tdb

	## Allows the server name that is advertised through MDNS to be set to the hostname rather than the Samba NETBIOS name.
	## This allows an administrator to make Samba registered MDNS records match the case of the hostname rather than being in all capitals.
	## (netbios, mdns)
	mdns name = mdns

	## Clients that only support netbios won't be able to see your samba server when netbios support is disabled.
	#disable netbios = Yes

	## Setting this value to no will cause nmbd never to become a local master browser.
	#local master = no

	## (auto, yes) If this is set to yes, on startup, nmbd will force an election, and it will have a slight advantage in winning the election. It is recommended that this parameter is used in conjunction with domain master = yes, so that nmbd can guarantee becoming a domain master. 
	#preferred master = yes

	## (445 139) Specifies which ports the server should listen on for SMB traffic.
	## 139 is netbios/nmbd
	#smb ports = 445 139

	## This is a list of files and directories that are neither visible nor accessible.
	## Each entry in the list must be separated by a '/', which allows spaces to be included in the entry. '*' and '?' can be used to specify multiple files or directories as in DOS wildcards.
	veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/

	## If a directory that is to be deleted contains nothing but veto files this deletion will fail unless you also set the delete veto files parameter to yes.
	delete veto files = yes

################ Filesystem and creation rules ################
	## reported filesystem type (NTFS,Samba,FAT)
	#fstype = FAT

	## Allows a user who has write access to the file (by whatever means, including an ACL permission) to modify the permissions (including ACL) on it.
	#dos filemode = Yes

	## file/dir creating rules
	#create mask = 0666
	#directory mask = 0777
	#force group = root
	#force user = root
	#inherit owner = windows and unix
################################################################

my packtage list :


root@ROUTEUR:~# opkg list
ath10k-firmware-qca4019-ct - 2020-07-02-1
ath10k-firmware-qca9888-ct - 2020-07-02-1
base-files - 204.2-r10911-c155900f66
block-mount - 2020-01-18-189b41b6-1
busybox - 1.30.1-6
bzip2 - 1.0.8-1
ca-bundle - 20200601-1
ca-certificates - 20200601-1
cgi-io - 19
curl - 7.66.0-3
dnsmasq - 2.80-16.3
dropbear - 2019.78-2
firewall - 2019-11-22-8174814a-3
fstools - 2020-01-18-189b41b6-1
fwtool - 2
getrandom - 2019-06-16-4df34a4d-4
hostapd-common - 2019-08-08-ca8c2bd2-7
ip6tables - 1.8.3-1
ipq-wifi-linksys_ea8300 - 1
iptables - 1.8.3-1
iw - 5.0.1-1
iwinfo - 2019-10-16-07315b6f-1
jshn - 2020-05-25-66195aee-1
jsonfilter - 2018-02-04-c7e938d6-1
kernel - 4.14.167-1-fa00c1231ac7d7840ec6ffe62dcad926
kmod-ath - 4.14.167+4.19.98-1-1
kmod-ath10k-ct - 4.14.167+2019-09-09-5e8cd86f-1
kmod-cfg80211 - 4.14.167+4.19.98-1-1
kmod-crypto-aead - 4.14.167-1
kmod-crypto-ccm - 4.14.167-1
kmod-crypto-cmac - 4.14.167-1
kmod-crypto-ctr - 4.14.167-1
kmod-crypto-des - 4.14.167-1
kmod-crypto-ecb - 4.14.167-1
kmod-crypto-gcm - 4.14.167-1
kmod-crypto-gf128 - 4.14.167-1
kmod-crypto-ghash - 4.14.167-1
kmod-crypto-hash - 4.14.167-1
kmod-crypto-hmac - 4.14.167-1
kmod-crypto-iv - 4.14.167-1
kmod-crypto-manager - 4.14.167-1
kmod-crypto-md4 - 4.14.167-1
kmod-crypto-md5 - 4.14.167-1
kmod-crypto-null - 4.14.167-1
kmod-crypto-pcompress - 4.14.167-1
kmod-crypto-rng - 4.14.167-1
kmod-crypto-seqiv - 4.14.167-1
kmod-crypto-sha256 - 4.14.167-1
kmod-crypto-sha512 - 4.14.167-1
kmod-crypto-wq - 4.14.167-1
kmod-fs-ksmbd - 4.14.167+3.1.1-1
kmod-fs-ntfs - 4.14.167-1
kmod-fuse - 4.14.167-1
kmod-gpio-button-hotplug - 4.14.167-3
kmod-hwmon-core - 4.14.167-1
kmod-ip6tables - 4.14.167-1
kmod-ipt-conntrack - 4.14.167-1
kmod-ipt-core - 4.14.167-1
kmod-ipt-nat - 4.14.167-1
kmod-ipt-offload - 4.14.167-1
kmod-leds-gpio - 4.14.167-1
kmod-lib-crc-ccitt - 4.14.167-1
kmod-mac80211 - 4.14.167+4.19.98-1-1
kmod-nf-conntrack - 4.14.167-1
kmod-nf-conntrack6 - 4.14.167-1
kmod-nf-flow - 4.14.167-1
kmod-nf-ipt - 4.14.167-1
kmod-nf-ipt6 - 4.14.167-1
kmod-nf-nat - 4.14.167-1
kmod-nf-reject - 4.14.167-1
kmod-nf-reject6 - 4.14.167-1
kmod-nls-base - 4.14.167-1
kmod-nls-utf8 - 4.14.167-1
kmod-ppp - 4.14.167-1
kmod-pppoe - 4.14.167-1
kmod-pppox - 4.14.167-1
kmod-scsi-core - 4.14.167-1
kmod-slhc - 4.14.167-1
kmod-usb-core - 4.14.167-1
kmod-usb-dwc3 - 4.14.167-1
kmod-usb-dwc3-of-simple - 4.14.167-1
kmod-usb-ledtrig-usbport - 4.14.167-1
kmod-usb-storage - 4.14.167-1
kmod-usb-storage-extras - 4.14.167-1
kmod-usb-storage-uas - 4.14.167-1
kmod-usb3 - 4.14.167-1
ksmbd-server - 3.3.9-1
ksmbd-utils - 3.3.9-1
libblobmsg-json - 2020-05-25-66195aee-1
libbz2-1.0 - 1.0.8-1
libc - 1.1.24-2
libcurl4 - 7.66.0-3
libgcc1 - 7.5.0-2
libip4tc2 - 1.8.3-1
libip6tc2 - 1.8.3-1
libiwinfo-lua - 2019-10-16-07315b6f-1
libiwinfo20181126 - 2019-10-16-07315b6f-1
libjson-c2 - 0.12.1-3.1
libjson-script - 2020-05-25-66195aee-1
liblua5.1.5 - 5.1.5-3
liblucihttp-lua - 2019-07-05-a34a17d5-1
liblucihttp0 - 2019-07-05-a34a17d5-1
liblzma - 5.2.5-1
libmbedtls12 - 2.16.10-1
libnl-core200 - 3.4.0-2
libnl-genl200 - 3.4.0-2
libnl-tiny - 0.1-5
libopenssl1.1 - 1.1.1k-1
libpcre - 8.43-1
libpthread - 1.1.24-2
librt - 1.1.24-2
libubox20191228 - 2020-05-25-66195aee-1
libubus-lua - 2019-12-27-041c9d1c-1
libubus20191227 - 2019-12-27-041c9d1c-1
libuci20130104 - 2019-09-01-415f9e48-4
libuclient20160123 - 2020-06-17-51e16ebf-1
libusb-1.0-0 - 1.0.22-2
libxtables12 - 1.8.3-1
logd - 2019-06-16-4df34a4d-4
lua - 5.1.5-3
luci-app-adguardhome - 1.8-11
luci-app-advanced-reboot - 1.0.0-1-1
luci-app-firewall - git-21.160.68865-15ca915-1
luci-app-ksmbd - git-21.160.68865-15ca915-1
luci-app-opkg - git-21.160.68865-15ca915-1
luci-base - git-21.160.68865-15ca915-1
luci-compat - git-21.160.68865-15ca915-1
luci-i18n-base-fr - git-21.160.68865-15ca915-1
luci-i18n-ksmbd-fr - git-21.160.68865-15ca915-1
luci-lib-ip - git-21.160.68865-15ca915-1
luci-lib-jsonc - git-21.160.68865-15ca915-1
luci-lib-nixio - git-21.160.68865-15ca915-1
luci-mod-admin-full - git-21.160.68865-15ca915-1
luci-mod-network - git-21.160.68865-15ca915-1
luci-mod-status - git-21.160.68865-15ca915-1
luci-mod-system - git-21.160.68865-15ca915-1
luci-proto-ipv6 - git-21.160.68865-15ca915-1
luci-proto-ppp - git-21.160.68865-15ca915-1
luci-theme-bootstrap - git-21.160.68865-15ca915-1
mtd - 24
netifd - 2021-01-09-753c351b-1
ntfs-3g - 2017.3.23-2-fuseint
odhcp6c - 2021-01-09-64e1b4e7-16
odhcpd-ipv6only - 2020-05-03-49e4949c-3
openwrt-keyring - 2021-02-20-49283916-2
opkg - 2021-01-31-c5dccea9-1
ppp - 2.4.7.git-2019-05-25-3
ppp-mod-pppoe - 2.4.7.git-2019-05-25-3
procd - 2020-03-07-09b9bd82-1
rpcd - 2020-05-26-67c8a3fd-1
rpcd-mod-file - 2020-05-26-67c8a3fd-1
rpcd-mod-iwinfo - 2020-05-26-67c8a3fd-1
rpcd-mod-luci - 20201107
swconfig - 12
tar - 1.32-1
ubi-utils - 2.1.1-1
uboot-envtools - 2018.03-3
ubox - 2019-06-16-4df34a4d-4
ubus - 2019-12-27-041c9d1c-1
ubusd - 2019-12-27-041c9d1c-1
uci - 2019-09-01-415f9e48-4
uclient-fetch - 2020-06-17-51e16ebf-1
uhttpd - 2020-10-01-3abcc891-1
urandom-seed - 1.0-1
urngd - 2020-01-21-c7f7b6b6-1
usbutils - 007-10
usign - 2020-05-23-f1f65026-1
wget - 1.20.3-4
wireless-regdb - 2020.11.20-1
wpad-basic - 2019-08-08-ca8c2bd2-7
wsdd2 - 2020-11-19-e0cf50d5-1
xz - 5.2.5-1
xz-utils - 5.2.5-1
zlib - 1.2.11-3

i don't know why don't work, and me bad english and "noob" on openwrt and linux system

thank for your help

CIFS is easier to set up, generally speaking.

i don't know, what do you want

do you want me install CIFS ?

Replace samba with cifs, if you want.

Have you tried with the IP of you openwrt ?
\\192.168.1.1\ (for exemple)

1 Like

yes, i have try ( my local ip is 10.0.0.2 ) but fail.

i have reinstall openwrt on my alternative partition

i have all configured ( adguard and 1 script )

but now, i need help for create clean usb shared local network :confused:

what is 1 script ? (I am curious by nature...)

ahah

1 script, i try to speak you ... ^^

actualy i not have internet on my housse. i use network neighbor.
my neighbor have 2 networks, public ( hotspot FON ) and private
public network timeout automatic 2 houres, and again, go on administration page for login again..

and the public hotspot limite 1 device ...

the script go to network "perdu.com" if good, re-try 10 seconde after, and again and again....
if not good, go on FON login page and re-enter login and validate...

i have uptime 95%~ but, i not have all open port ( exemple P2P is close )

for P2P app, i'am use my phone hotspot whit 60go data.

okay...
I was thinking about a addware script solution ! :wink:
thanks... for the explanation

you need to have access to your usb partition in OpenWrt, then you just need to add a share in KSMB of the mounted folder of this partition...

^^

and you think is possible help me by remote assistance for explain me how to create and config SMB ?

i reassure me if possible for you look me on remote assistance

please ^^

opkg update
opkg install block-mount

and any usb device specific kmod
and any filesystem specific kmod

then edit /etc/config/fstab or by luci, add a mount configuration for your usb partition and enable it

opkg update
opkg install luci-app-ksmbd ksmbd-server ksmbd-utils

then edit /etc/config/ksmbd
or use luci to add a share to your firstly created directory of you usb partition

then you'll get a usb shared by samba protocol

1 Like

do not forget kmod-usb-storage-uas for USB 3

1 Like

Prepare for usb mount

opkg update
opkg install block-mount lsblk blkid usbutils kmod-usb-storage-uas ntfs-3g ntfs-3g-utils

Add usb mountpoint

block detect > /etc/config/fstab
service enable fstab
block mount

» luci / system / mount points

Prepare for Samba share

opkg install luci-app-ksmbd ksmbd-server kmod-fs-ksmbd kmsbd-utils ksmbd-avahi-service
service ksmbd enable

Add Samba share

» luci / service / network shares

Edit:
I will try to document the workaround on 19.07.7 necessary because of the issue of ksmbd dependency missing…

very thank you for your help, you are serious, and very pro !

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.