NethServer Version: 8
Module: samba
When trying to authenticate an external service at AD LDAP Service, I noticed that the presented certificate is expired since a long time.
#openssl s_client -showcerts -connect x.x.x.x:636
Connecting to y.y.y.y
CONNECTED(00000003)
Can't use SSL_get_servername
depth=0 O=Samba Administration, OU=Samba - temporary autogenerated HOST certificate, CN=NSDC-HOMESB8496.xx.xx.xx
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 O=Samba Administration, OU=Samba - temporary autogenerated HOST certificate, CN=NSDC-HOMESB8496.xx.xx.xx
verify error:num=21:unable to verify the first certificate
verify return:1
depth=0 O=Samba Administration, OU=Samba - temporary autogenerated HOST certificate, CN=NSDC-HOMESB8496.xx.xx.xx
verify error:num=10:certificate has expired
notAfter=Nov 6 08:43:11 2021 GMT
verify return:1
depth=0 O=Samba Administration, OU=Samba - temporary autogenerated HOST certificate, CN=NSDC-HOMESB8496.xx.xx.xx
notAfter=Nov 6 08:43:11 2021 GMT
verify return:1
---
Certificate chain
0 s:O=Samba Administration, OU=Samba - temporary autogenerated HOST certificate, CN=NSDC-HOMESB8496.xx.xx.xx
i:O=Samba Administration, OU=Samba - temporary autogenerated CA certificate, CN=NSDC-HOMESB8496.xx.xx.xx
a:PKEY: RSA, 4096 (bit); sigalg: sha256WithRSAEncryption
v:NotBefore: Dec 7 08:43:11 2019 GMT; NotAfter: Nov 6 08:43:11 2021 GMT
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
---
Server certificate
subject=O=Samba Administration, OU=Samba - temporary autogenerated HOST certificate, CN=NSDC-HOMESB8496.xx.xx.xx
issuer=O=Samba Administration, OU=Samba - temporary autogenerated CA certificate, CN=NSDC-HOMESB8496.xx.xx.xx
---
Acceptable client certificate CA names
O=Samba Administration, OU=Samba - temporary autogenerated CA certificate, CN=NSDC-HOMESB8496.xx.xx.xx
Requested Signature Algorithms: RSA+SHA256:rsa_pss_pss_sha256:RSA-PSS+SHA256:ECDSA+SHA256:ed25519:RSA+SHA384:rsa_pss_pss_sha384:RSA-PSS+SHA384:ECDSA+SHA384:ed448:RSA+SHA512:rsa_pss_pss_sha512:RSA-PSS+SHA512:ECDSA+SHA512:UNDEF:UNDEF
Shared Requested Signature Algorithms: RSA+SHA256:rsa_pss_pss_sha256:RSA-PSS+SHA256:ECDSA+SHA256:ed25519:RSA+SHA384:rsa_pss_pss_sha384:RSA-PSS+SHA384:ECDSA+SHA384:ed448:RSA+SHA512:rsa_pss_pss_sha512:RSA-PSS+SHA512:ECDSA+SHA512
Peer signing digest: SHA256
Peer signature type: rsa_pss_rsae_sha256
Peer Temp Key: X25519, 253 bits
---
SSL handshake has read 2496 bytes and written 415 bytes
Verification error: certificate has expired
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Protocol: TLSv1.3
Server public key is 4096 bit
This TLS version forbids renegotiation.
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 10 (certificate has expired)
---
closed
(it is a server instance migrated from NS7, probably the autogenerated certificate is still an certificate from NS7? not sure?
In addition there are a lot of decryption errors in /var/log/messages
Feb 13 19:43:38 ns8-host samba-dc[2720]: Auth: [LDAP,simple bind/TLS] user [HOME]\[ldapservice@xx.xx.xx] at [Fri, 13 Feb 2026 19:43:38.405649 UTC] with [Plaintext] status [NT_STATUS_OK] workstation [NSDC-HOMESB8496] remote host [ipv4:y.y.y.y:42712] became [HOME]\[ldapservice] [S-1-5-21-1960968967-3681124264-3238789705-1103]. local host [ipv4:y.y.y.y:636]
Feb 13 19:43:38 ns8-host ldapproxy[2522]: 2026/02/13 19:43:38 [info] 26#26: *4870561 client disconnected, bytes from/to client:159/278, bytes from/to upstream:278/159
Feb 13 19:43:38 ns8-host ldapproxy[2522]: 2026/02/13 19:43:38 [info] 26#26: *4870563 client 127.0.0.1:51246 connected to 127.0.0.1:20001
Feb 13 19:43:38 ns8-host ldapproxy[2522]: 2026/02/13 19:43:38 [info] 26#26: *4870563 proxy y.y.y.y:42714 connected to y.y.y.y:636
Feb 13 19:43:38 ns8-host samba-dc[2720]: Auth: [LDAP,simple bind/TLS] user [HOME]\[ldapservice@xx.xx.xx] at [Fri, 13 Feb 2026 19:43:38.466259 UTC] with [Plaintext] status [NT_STATUS_OK] workstation [NSDC-HOMESB8496] remote host [ipv4:y.y.y.y:42714] became [HOME]\[ldapservice] [S-1-5-21-1960968967-3681124264-3238789705-1103]. local host [ipv4:y.y.y.y:636]
Feb 13 19:43:38 ns8-host ldapproxy[2522]: 2026/02/13 19:43:38 [info] 26#26: *4870563 client disconnected, bytes from/to client:239/402, bytes from/to upstream:402/239
Feb 13 19:43:38 ns8-host samba-dc[2720]: Auth: [LDAP,simple bind/TLS] user [(null)]\[cn=ldapservice,dc=directory,dc=nh] at [Fri, 13 Feb 2026 19:43:38.754695 UTC] with [Plaintext] status [NT_STATUS_NO_SUCH_USER] workstation [NSDC-HOMESB8496] remote host [ipv4:10.0.1.12:53326] mapped to [(null)]\[(null)]. local host [ipv4:y.y.y.y:389]
Feb 13 19:43:38 ns8-host samba-dc[2720]: Auth: [LDAP,simple bind/TLS] user [HOME]\[ldapservice@xx.xx.xx] at [Fri, 13 Feb 2026 19:43:38.861785 UTC] with [Plaintext] status [NT_STATUS_OK] workstation [NSDC-HOMESB8496] remote host [ipv4:y.y.y.y:56468] became [HOME]\[ldapservice] [S-1-5-21-1960968967-3681124264-3238789705-1103]. local host [ipv4:y.y.y.y:636]
Feb 13 19:43:38 ns8-host samba-dc[2720]: TLS source4/lib/tls/tls_tstream.c:1449 - Decryption has failed.
Feb 13 19:43:38 ns8-host samba-dc[2720]: TLS source4/lib/tls/tls_tstream.c:1449 - Decryption has failed.
Feb 13 19:43:39 ns8-host samba-dc[2720]: TLS source4/lib/tls/tls_tstream.c:1449 - Decryption has failed.
Feb 13 19:43:39 ns8-host samba-dc[2720]: Auth: [LDAP,simple bind/TLS] user [HOME]\[CN=USER1,CN=Users,DC=ad,DC=home,DC=lan] at [Fri, 13 Feb 2026 19:43:39.033551 UTC] with [Plaintext] status [NT_STATUS_OK] workstation [NSDC-HOMESB8496] remote host [ipv4:y.y.y.y:56468] became [HOME]\[USER1] [S-1-5-21-1960968967-3681124264-3238789705-1107]. local host [ipv4:y.y.y.y:636]
Feb 13 19:43:39 ns8-host samba-dc[2720]: TLS source4/lib/tls/tls_tstream.c:1449 - Decryption has failed.
Feb 13 19:43:39 ns8-host samba-dc[2720]: TLS source4/lib/tls/tls_tstream.c:1449 - Decryption has failed.
Feb 13 19:43:39 ns8-host samba-dc[2720]: TLS source4/lib/tls/tls_tstream.c:1449 - Decryption has failed.
Feb 13 19:43:39 ns8-host ldapproxy[2522]: 2026/02/13 19:43:39 [info] 26#26: *4870565 client 127.0.0.1:51254 connected to 127.0.0.1:20001
Feb 13 19:43:39 ns8-host ldapproxy[2522]: 2026/02/13 19:43:39 [info] 26#26: *4870565 proxy y.y.y.y:42722 connected to y.y.y.y:636
Feb 13 19:43:39 ns8-host samba-dc[2720]: Auth: [LDAP,simple bind/TLS] user [HOME]\[ldapservice@xx.xx.xx] at [Fri, 13 Feb 2026 19:43:39.249473 UTC] with [Plaintext] status [NT_STATUS_OK] workstation [NSDC-HOMESB8496] remote host [ipv4:y.y.y.y:42722] became [HOME]\[ldapservice] [S-1-5-21-1960968967-3681124264-3238789705-1103]. local host [ipv4:y.y.y.y:636]
Feb 13 19:43:39 ns8-host ldapproxy[2522]: 2026/02/13 19:43:39 [info] 26#26: *4870565 client disconnected, bytes from/to client:158/277, bytes from/to upstream:277/158
Feb 13 19:43:39 ns8-host ldapproxy[2522]: 2026/02/13 19:43:39 [info] 26#26: *4870567 client 127.0.0.1:51264 connected to 127.0.0.1:20001
Feb 13 19:43:39 ns8-host ldapproxy[2522]: 2026/02/13 19:43:39 [info] 26#26: *4870567 proxy y.y.y.y:42724 connected to y.y.y.y:636
Feb 13 19:43:39 ns8-host samba-dc[2720]: Auth: [LDAP,simple bind/TLS] user [HOME]\[ldapservice@xx.xx.xx] at [Fri, 13 Feb 2026 19:43:39.293483 UTC] with [Plaintext] status [NT_STATUS_OK] workstation [NSDC-HOMESB8496] remote host [ipv4:y.y.y.y:42724] became [HOME]\[ldapservice] [S-1-5-21-1960968967-3681124264-3238789705-1103]. local host [ipv4:y.y.y.y:636]
Feb 13 19:43:39 ns8-host ldapproxy[2522]: 2026/02/13 19:43:39 [info] 26#26: *4870567 client disconnected, bytes from/to client:238/414, bytes from/to upstream:414/238
Seems this is related to the expired certificate - but not sure?
Saw the HowTo on Installation of Custom Certificate, however I’m uncertain:
- Do I really need to install a customer certificate to get a new actual valid certificate for the AD LDAP access - is this the right procedure for this issue?
- Or is there a way to generate a new “auto-generated” certificate for samba for LDAP access?
- Is there or will there be any mechanism forseen in NS8 to update this certificate automatically?
Thanks for any hint.
