OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Networking => Topic started by: Paul Smedley on June 21, 2020, 10:34:56 am

Title: Samba Server v4.11.9
Post by: Paul Smedley on June 21, 2020, 10:34:56 am
Hi All,

I'm now at a point in Samba Server development where i'm prepared to publicly share some binaries based on Samba v4.11.9

Client tools/DLLs:
http://smedley.id.au/tmp/smbcl411-4.11.9-20200621.zip

Server executables:
http://smedley.id.au/tmp/smbd-4.11.9-20200621.zip

Note: no installer is available yet, and I have no real idea what's involved in upgrading a Server running v3.6.x to v4.11.9

Note: by default Samba v4.11 only accepts SMB2+ connections - you can enable SMB1, but you need to be aware of the security implications.

This has now had a reasonable amount of testing from linux, Windows and OS/2 (using the Samba 4.x client).

I'm not aware of any significant bugs - known issues are the log file being created as log.smbd.exe not log.smbd - but this is a low priority to fix right now.

Feedback appreciated.

Cheers,

Paul.
Title: Re: Samba Server v4.11.9
Post by: Paul Smedley on June 22, 2020, 10:38:55 am
Hi All,

I'm now at a point in Samba Server development where i'm prepared to publicly share some binaries based on Samba v4.11.9

Client tools/DLLs:
http://smedley.id.au/tmp/smbcl411-4.11.9-20200621.zip

Server executables:
http://smedley.id.au/tmp/smbd-4.11.9-20200621.zip

Note: no installer is available yet, and I have no real idea what's involved in upgrading a Server running v3.6.x to v4.11.9

Note: by default Samba v4.11 only accepts SMB2+ connections - you can enable SMB1, but you need to be aware of the security implications.

This has now had a reasonable amount of testing from linux, Windows and OS/2 (using the Samba 4.x client).

I'm not aware of any significant bugs - known issues are the log file being created as log.smbd.exe not log.smbd - but this is a low priority to fix right now.

Feedback appreciated.


At least 10 unique downloads, and not a single comment?
Title: Re: Samba Server v4.11.9
Post by: Mike Kölling on June 22, 2020, 02:19:13 pm
Hi Paul,

I am going to download it this week and give it a try. But I do need some time to do it. I will keep you updated once I have done the test.
Thanks again for your ongoing support. It is very appreciated.

Greetings from Potsdam / Germany,
Mike
Title: Re: Samba Server v4.11.9
Post by: Ian Manners on June 22, 2020, 05:37:37 pm
Hi Paul,

I've downloaded it but will take a few days to set it up, never used Samba before but hoping it will make my life easier to update os2site.com via a linux laptop. So.. it all takes time but ignoring the newbie stuff, will let you know :)
Title: Re: Samba Server v4.11.9
Post by: Mike Kölling on June 23, 2020, 02:06:39 pm
Hi All,

I'm now at a point in Samba Server development where i'm prepared to publicly share some binaries based on Samba v4.11.9

Server executables:
http://smedley.id.au/tmp/smbd-4.11.9-20200621.zip


Hi Paul,

I tried the server today, but couldn't get it running. I replaced all the files in my working 3.6.25 samba server.
SMBD is starting as usual. NMBD fails. Error: SYS1041: The name nmbd is not recognized as an internal or external command, operable program or batch file.
Could you share which additional prerequisites might be necessary to start your build.

Replacing your server progs with the original ones brings the working Samba server 3.6.25 back.

Greetings,
Mike
Title: Re: Samba Server v4.11.9
Post by: Paul Smedley on June 23, 2020, 11:30:37 pm
Hi Mike,

The only 'unusual' dependency should be GTLS30.DLL from komh's GNUTLS 3.5.8 package http://hobbes.nmsu.edu/download/pub/os2/dev/unix/gnutls-3.5.8.zip

If nmbd isn't starting, is there anything in popuplog.os2 or x:\mptn\etc\samba\log\log.nmbd ?

It would also be worth checking dependency DLL's with pmdll.exe

Cheers,

Paul
Title: Re: Samba Server v4.11.9
Post by: Dave Yeo on June 24, 2020, 02:49:59 am
ArcaOS 5.0.5 may have installed GTLS30.DLL into @unixroot\usr\lib.
Title: Re: Samba Server v4.11.9
Post by: Paul Smedley on June 24, 2020, 04:35:29 am
ArcaOS 5.0.5 may have installed GTLS30.DLL into @unixroot\usr\lib.

Makes sense - ArcaOS 5.0.5 includes the Samba v4.11.x client...
Title: Re: Samba Server v4.11.9
Post by: Andy Willis on June 24, 2020, 05:11:34 am
At least 10 unique downloads, and not a single comment?
I had a broken 3.6 install, I am getting further with the 4.11 while trying to fix it but at this point I am assuming the problems I have are related to the original issues, thus nothing to report until I get it sorted out.  I am seeing a bunch or assertions in libcx pwrite but I assume those are from Samba tools that were written for 3.6 (making it harder to sort this all out).
Title: Re: Samba Server v4.11.9
Post by: Paul Smedley on June 24, 2020, 05:21:01 am
Hi Andy,
At least 10 unique downloads, and not a single comment?
I had a broken 3.6 install, I am getting further with the 4.11 while trying to fix it but at this point I am assuming the problems I have are related to the original issues, thus nothing to report until I get it sorted out.  I am seeing a bunch or assertions in libcx pwrite but I assume those are from Samba tools that were written for 3.6 (making it harder to sort this all out).

I was seeing pwrite assertion failures in earlier builds of 4.11 - make sure you're using the latest smbcl411.dll. For whatever reason, the replacement pwrite in libcx started causing issues, so I have a custom import lib to revert to using the libc version. This seemed to only impact smbd here.

Also - I'd suggest cleaning out your %ETC%\samba and starting with a fresh smb.conf

I've attached a minimal smb.conf to this post
Title: Re: Samba Server v4.11.9
Post by: Mike Kölling on June 24, 2020, 01:21:50 pm
Hi Mike,

The only 'unusual' dependency should be GTLS30.DLL from komh's GNUTLS 3.5.8 package http://hobbes.nmsu.edu/download/pub/os2/dev/unix/gnutls-3.5.8.zip

If nmbd isn't starting, is there anything in popuplog.os2 or x:\mptn\etc\samba\log\log.nmbd ?

It would also be worth checking dependency DLL's with pmdll.exe

Cheers,

Paul

Dear Paul,

I just gave it another try and placed your files again in my working environment.
pmDLL.exe showed no missing DLLs.
GNUTL is already installed with ANPM.
So I tried to start the Samba server again and now it is working, no failure message any longer. I have absolutely no clue what happened yesterday.
Accessing files on the Samba server from Win7 is working fine.
Win10 sees the Samba server but tells me that the password to access the files is wrong.
Going back to 3.6.25 =>W10 is working fine as well.

Greetings,
Mike
Title: Re: Samba Server v4.11.9
Post by: Paul Smedley on June 24, 2020, 11:06:50 pm
Hi Mike,

The only 'unusual' dependency should be GTLS30.DLL from komh's GNUTLS 3.5.8 package http://hobbes.nmsu.edu/download/pub/os2/dev/unix/gnutls-3.5.8.zip

If nmbd isn't starting, is there anything in popuplog.os2 or x:\mptn\etc\samba\log\log.nmbd ?

It would also be worth checking dependency DLL's with pmdll.exe


I just gave it another try and placed your files again in my working environment.
pmDLL.exe showed no missing DLLs.
GNUTL is already installed with ANPM.
So I tried to start the Samba server again and now it is working, no failure message any longer. I have absolutely no clue what happened yesterday.
Accessing files on the Samba server from Win7 is working fine.
Win10 sees the Samba server but tells me that the password to access the files is wrong.
Going back to 3.6.25 =>W10 is working fine as well.

Glad to see the servers are starting for you now.

For Win 10 - I'm going to suspect that at some time you had to 'modify' things to work with the old Samba 3.6 - something like https://centosfaq.org/centos/samba-issues-with-win-10/

This may have set security settings in Win10 that are now not allowed by Samba 4.11.x. For example - you may have forced SMB1 to be used by Win10 - this protocol is disabled by default in Samba 4.11 - but can be enabled by adding 'client min protocol=NT1' to the [global] section of smb.conf

Cheers,

Paul
Title: Re: Samba Server v4.11.9
Post by: Mike Kölling on June 25, 2020, 09:50:24 am
Hi Paul,


Glad to see the servers are starting for you now.

For Win 10 - I'm going to suspect that at some time you had to 'modify' things to work with the old Samba 3.6 - something like https://centosfaq.org/centos/samba-issues-with-win-10/

This may have set security settings in Win10 that are now not allowed by Samba 4.11.x. For example - you may have forced SMB1 to be used by Win10 - this protocol is disabled by default in Samba 4.11 - but can be enabled by adding 'client min protocol=NT1' to the [global] section of smb.conf


I have the 'client min protocol=NT1' in my global section.

Please see here:

# Samba config file created using SSCC ver. 1.1.3
# from Mike@PC25_AOS
# Date: 14 Jun 2020 13:15:10
[global]
workgroup = xxx
server string = %h Samba Server
null passwords = Yes
guest account = guest
username map = C:\MPTN\ETC\samba\private\smbusermap
log file = C:\MPTN\ETC\samba\log\log.smbd.%U.%M
max protocol = SMB2
time server = Yes
load printers = No
printcap name = F:\etc\printcap
enumports command = F:\Programs\Samba\enumports.cmd
add user script = F:\Programs\Samba\usermod.cmd -a "%u"
rename user script = F:\Programs\Samba\usermod.cmd -r "%uold" "%unew"
delete user script = F:\Programs\Samba\usermod.cmd -x "%u"
add group script = F:\Programs\Samba\groupmod.cmd -a "%g"
delete group script = F:\Programs\Samba\groupmod.cmd -x "%g"
add user to group script = F:\Programs\Samba\groupmod.cmd -j "%g" "%u"
delete user from group script = F:\Programs\Samba\groupmod.cmd -l "%g" "%u"
set primary group script = F:\Programs\Samba\usermod.cmd -p "%u" "%g"
add machine script = F:\Programs\Samba\usermod.cmd -a "%u"
lm announce = Yes
wins support = Yes
add share command = F:\Programs\Samba\addshare.cmd
change share command = F:\Programs\Samba\changeshare.cmd
delete share command = F:\Programs\Samba\delshare.cmd
lock directory = C:\MPTN\ETC\samba\lock
nmbd bind explicit broadcast = No
comment = X250 mit OS/2
create mask = 0777
ea support = Yes
store dos attributes = Yes
client min protocol = NT1
name resolve order = lmhosts wins host bcast
wins server =
log level = 2

Greetings,
Mike
Title: Re: Samba Server v4.11.9
Post by: Paul Smedley on June 25, 2020, 11:24:10 am
Most useful would be a log.smbd.exe with debuglevel of 3 and an attempt to connect from win10...
Title: Re: Samba Server v4.11.9
Post by: Mike Kölling on June 25, 2020, 04:23:53 pm
Most useful would be a log.smbd.exe with debuglevel of 3 and an attempt to connect from win10...

Here you are.

Greetings,
Mike
Title: Re: Samba Server v4.11.9
Post by: Paul Smedley on June 25, 2020, 11:17:09 pm
Hi Mike,

Most useful would be a log.smbd.exe with debuglevel of 3 and an attempt to connect from win10...

Here you are.

Greetings,
Mike

Here's the relevant part:
[2020/06/25 16:11:47.936000,  2] ../../libcli/auth/ntlm_check.c:429(ntlm_password_check)
  ntlm_password_check: NTLMv1 passwords NOT PERMITTED for user Mike
[2020/06/25 16:11:47.936000,  3] ../../libcli/auth/ntlm_check.c:436(ntlm_password_check)
  ntlm_password_check: NEITHER LanMan nor NT password supplied for user Mike
[2020/06/25 16:11:47.936000,  2] ../../source3/auth/auth.c:343(auth_check_ntlm_password)
  check_ntlm_password:  Authentication for user [Mike] -> [Mike] FAILED with error NT_STATUS_WRONG_PASSWORD, authoritative=1

As suspected, it looks like you've downgraded Win10 to use a lower grade authentication scheme to be compatible with older Samba versions...

NTLMv1 was disabled by default a few Samba versions ago. If you want to keep Win10 compatible with Samba 3.6, you can add (I think)
ntlm auth = yes

to the global section of your smb.conf

Of course, the better option for security would be to move 100% to Samba 4.x and fix Win10 :)

Cheers,

Paul
Title: Re: Samba Server v4.11.9
Post by: Mike Kölling on June 26, 2020, 09:21:28 am

NTLMv1 was disabled by default a few Samba versions ago. If you want to keep Win10 compatible with Samba 3.6, you can add (I think)
ntlm auth = yes
to the global section of your smb.conf


Hi Paul,

That did the trick. I can't go up to the security level of Samba 4 by now, because we still run an old file server (with eCS2.0RC6a) with an old Samba 3.0 server - Never touch a running system :).
And the Win 10 machine must see this old file server.

Thanks for your help to solve the issue.
Wish you a nice weekend.

Greetings from Potsdam / Germany,
Mike
Title: Re: Samba Server v4.11.9
Post by: Paul Smedley on June 26, 2020, 10:44:24 am
Hi Mike,


NTLMv1 was disabled by default a few Samba versions ago. If you want to keep Win10 compatible with Samba 3.6, you can add (I think)
ntlm auth = yes
to the global section of your smb.conf

That did the trick. I can't go up to the security level of Samba 4 by now, because we still run an old file server (with eCS2.0RC6a) with an old Samba 3.0 server - Never touch a running system :).
And the Win 10 machine must see this old file server.

Thanks for your help to solve the issue.
Wish you a nice weekend.

Glad it helped. Given you run both Samba 3.0 and now 4.11.9 I'm really interested in any comments on performance, stability, etc

Cheers,

Paul
Title: Re: Samba Server v4.11.9
Post by: Mike Kölling on June 26, 2020, 01:23:28 pm
Glad it helped. Given you run both Samba 3.0 and now 4.11.9 I'm really interested in any comments on performance, stability, etc

Hi Paul,

The old Samba server is restarted once every week automatically to avoid problems with the Samba server. The computer by itself needs to be restarted every second month usually. We needed some time debug the script files coming with the 3.0 but now it is stable enough for us. The biggest issue we have with the older Samba server are the remains of temporary files like "~name.docx" or ".~lock.name.odt" once we open files lets say in MS-Word or OpenOffice. After closing the files the temporary files still exists. We have to clean it manually from time to time. I never saw such a problem using the 3.6 or now with your 4.11 version. Another issue with the older Samba server is the rights management. Not sure if it is better now with the newer version, because testing has taken place mainly by my person with no access from other accounts.

Greetings,
Mike
Title: Re: Samba Server v4.11.9
Post by: Dariusz Piatkowski on July 05, 2020, 05:29:21 pm
Hi Paul,

Hi All,

I'm now at a point in Samba Server development where i'm prepared to publicly share some binaries based on Samba v4.11.9

Client tools/DLLs:
http://smedley.id.au/tmp/smbcl411-4.11.9-20200621.zip...

Yikes, I'm badly behind on this...

OK, Q re: the Samba client...any chance you can release the NetDrive plug-in as well to match the upgraded client?

I am going to give just the client a try, I think it's safe to toss everything into the \usr\local\... path, that way no impact on the RPM official releases.

Thanks!
Title: Re: Samba Server v4.11.9
Post by: Dariusz Piatkowski on July 06, 2020, 09:41:05 pm
Paul!

Hi Paul,

Hi All,

I'm now at a point in Samba Server development where i'm prepared to publicly share some binaries based on Samba v4.11.9

Client tools/DLLs:
http://smedley.id.au/tmp/smbcl411-4.11.9-20200621.zip...

Yikes, I'm badly behind on this...

OK, Q re: the Samba client...any chance you can release the NetDrive plug-in as well to match the upgraded client?

I am going to give just the client a try, I think it's safe to toss everything into the \usr\local\... path, that way no impact on the RPM official releases.

Thanks!

So I'm talking the Samba client only here, CLI test: the stuff works but it's reporting itself as a 4.11.5, so is this the right stuff you wanted tested?

I put all the EXEs into \usr\local\bin and DLLs into \usr\local\lib, both are present in the right places in CONFIG.SYS, and running specifically from the CLI with a FULL PATH to the EXE itself still produces a 4.11.5 output from '--version'.

For what it's worth, I have the following currently present:

1) samba-client-4.11.5-0.oc00.i686
Code: [Select]
Directory of G:\usr\bin

 1-25-20  6:46p        13,729    124 a---  smbcacls.exe
 1-25-20  6:46p     1,072,315    124 a---  smbclient.exe
 1-25-20  6:46p       153,715    124 a---  smbclient.map
 1-25-20  6:46p       138,390    124 a---  smbspool.exe
 1-25-20  6:46p         3,984    124 a---  smbtree.exe
        5 file(s)   1,382,133 bytes used

2) your test release
Code: [Select]
Directory of G:\usr\local\bin

 6-20-20  8:14p        18,971      0 a---  smbcacls.exe
 6-20-20  8:13p     1,087,293      0 a---  smbclient.exe
 6-20-20  8:13p       158,022      0 a---  smbclient.map
 6-20-20  8:13p       143,544      0 a---  smbspool.exe
 6-20-20  8:13p         9,022      0 a---  smbtree.exe
        5 file(s)   1,416,852 bytes used
Title: Re: Samba Server v4.11.9
Post by: Paul Smedley on July 08, 2020, 08:22:48 am
Hi Dariusz,

Sorry for the delayed response. For the Netdrive client, you need an updated smbcl411.dll - I'll try package one up soon.

Cheers,

Paul
Title: Re: Samba Server v4.11.9
Post by: Dariusz Piatkowski on July 08, 2020, 07:47:44 pm
Hey Paul,

...Sorry for the delayed response. For the Netdrive client, you need an updated smbcl411.dll - I'll try package one up soon...

No worries, but please take a look at the previous post of mine where I reported that the client EXEs are reporting as the prior version, that being: 4.11.5 instead of 4.11.9.

Thanks again,
-Dariusz