Samba 4.9.x package support thread


#145

No worries, way to enable crash dump?


#146

enable core files = yes


#147

@Andy2244
I fixed it; just had to (again) perform smbpasswd -a newuser... before you shame me, I had done this before... surprised me to find I had to so this a second time despite me building with my saved configs in place.

All good:)


#148

Did you perform a sysupgrade with "Keep settings"? If so this should not happen, the smbpasswd is explicitly added as a config file to keep.


#149

@Ansuel @blamaz

Ok i hopefully found the nameing issue and a fix is up as PR. This was a oversight while changing from netbios to wsd based discovery.

Can you report back if the PR solved your problem or you can test the changes by hand. Basically the netbios name parameter needs to match your full router hostname, since that's what wsdd2 uses to announce the service.

PS: This means your hostname can be different than your share name.


#150

did you also check for wsdd2 not restarting?


#151

Yes should now restart on any samba/hostname related config change, PR is also up.


#152

I build images with my configs baked in; so more or less the same thing... But despite smbpasswd file being present in new updated snapshot firmware I built, it seems the Samba4 did not like it or accept it. The log error message i was getting too is indication of passwd on user not being present.. Strange huh?

I did go from a May 30 build with Samba4 to a Sept. 26th build... Perhaps a file permission issue but I dont think so.


#153

command hostname -f is not available in my router...


#154

Oh boy, yeah hostname is not a default busybox build option. Guess i must have added it to my router manually.
Will try to extract the settings directly via uci and create a new PR, sorry but i don't have a "stock" test router to avoid such errors.


#155

@Ansuel oki new PR is out, with the fix.
I also just noticed while testing the domain suffix, that without a Local domain setup via DHCP settings, i could also not see/access my share. Maybe this was the main issue all along for you and others?

From my understanding this should all work without a local domain suffix, but something breaks without one on my system atm. Maybe you can also test this on your system, with the new changed PR ?


#156

First, thanks @Andy2244 for help in other thread - we are pinpoint domain-netbios issue.

But now i write this message other reason - i make a performance tests, and results are... strange.

First, i use 5G wifi connection, about 250-300Mbps by iperf. The share are eSATA drive connected to Linksys AC3200, 106MBps according to hdperf. Filesystem ext4.
So, in Samba 3, i have 16MBps read / 7MBps write rates.
In Samba 4, i got 7.5MBps read / 20(!)MBps write.

I see the progress, but it's not the progress i need.

Do you have any hints how to return read rate to S3 level? S4 is useless for me in this situation - i have 90% of reading operations.


#157

Those results are very strange, write speeds should never exceed read speeds on compressed, larger files. Than those read/write speeds overall are very low, i suspect some wifi issue.
As reference i own the older model a wrt-1200ac and via lan cable i fully max. out the network connection on large file transfers via total commander. My read, write speeds are 110MB/s via a ssd on the esata port. I use no special samba4 or windows 10 settings.

So i would first try to narrow down what causes those strange speeds, try via lan cable, switch from esata to usb 3.0, try a ssd with f2fs formatted. If you get max speeds via cable, you can try diagnose why speeds are so slow and strange on wifi. If you don't get max speeds you know something is not working correctly.


#158

Ok, i check cable. 111 MBps, so it's NOT HDD or fs.
As i say above, i check wifi throughput by iperf - ~200Mbps. I also check SFTP transfer - 16MBps.
But Samba is still 7.5MBps at the top.
So yes, it's something wrong of the working above wifi connection.

Here is my template file:

[global]
	netbios name = |NAME| 
	interfaces = |INTERFACES|
	server string = |DESCRIPTION|
	workgroup = |WORKGROUP|
        server max protocol = SMB3
	browseable = yes
	deadtime = 30
	domain master = yes
	encrypt passwords = true
	enable core files = no
	guest account = nobody
	guest ok = yes
	invalid users = root
	local master = yes
	load printers = no
	map to guest = Bad User
	null passwords = yes
	obey pam restrictions = yes
	passdb backend = smbpasswd
	preferred master = yes
        load printers = no
	security = user
	smb encrypt = disabled
	smb passwd file = /etc/samba/smbpasswd

	syslog = 2
	use sendfile = yes
	writeable = yes

        read raw = Yes
        write raw = Yes

        getwd cache = yes
        oplocks = yes
        large readwrite = yes

#159

I suspect that your HDD is working in USB 2.0 mode which would explain your performance numbers at least somewhat or it's dying. lsusb and smartmontools would help. I have no performance issues either with various devices.


#160

@T-Troll Except for redefining a lot of default values, i don't see any problems in the conf.
The only none default value is obey pam restrictions, do you have pam installed and configured on openWRT?

How do you test and get those 111 MBps number and can you give more details on your setup? What os you use as client and how do you connect to the share and how do you test/benchmark?


#161

You miss the point it's MBps, not Mbps - megabytes, not megabits. Ok for my HDD.
I use Far manager copy/Windows explorer copy for test.

But we are returning to the question why S4 so slow at the over-wifi connection... Any ideas what to try?


#162

Ah my fault, so you get 111 MB/s via LAN and only 7.5 via Wifi?
As far as i know samba itself has no special settings regarding wifi transfer, so there is nothing specific you can try on this side. You can try set server max protocol = SMB2 and see if this for some odd reason works better for you.

I can't really help here, something is slowing down both samba3/4 over wifi, all you can do is try different wifi settings. There are the usual "speed" guides for samba, yet i can't remember any wifi specific settings, tips.


#163

Yes. However, SFTP reach 16MB/s at the same rig same conditions.

Ok, let me check myself, but it seems like some fragmentation/inconsistency problem.


#164

Hey @Andy2244! First of all, thanks for maintaining this. Samba configs are a pain in the ass generally and it's brave of you to maintain such a problematic package.

Just wanted to let you know that I've compiled latest PR yesterday and I still have same issue- if my netbios name isn't the same as hostname, my Windows PC won't connect to the shares (with a generic error).

The problem doesn't exist on MacOS.