Mal wieder SSO - Server 7.2 und OpnSense 23.7.1

,

Hallo zusammen,

es tut mir leid, dass ich mit SSO „um die Ecke“ kommen muss, aber ich habe inzwischen eigentlich alle Threads bzgl. des Themas hier durch. Und da das Fehlerbild sowohl an meinem Testsystem zuhause als auch in der Schule auftritt, schreibe ich mal.

Ich habe SSO mit der Opnsense wg. separaten Proxy-Servern (noch aus 6.2-Zeiten) bisher nicht verwendet, wollte das aber jetzt in Betrieb nehmen und scheitere. So sieht derzeit mein Systemzustand aus:

  • LMN 7.2 (Base: 7.2.0-rc11, Linbo 4.1.34, WebUI 7.2.22, Sophomorix 3.90.10-2), Server 10.32.1.1/12
  • OPNsense 23.7.1_3, 10.32.1.254/12
  • Zeit auf beiden Systemen gleich
  • OpnSense ist in der devices.csv m.E. korrekt gelistet:
    server;firewall;nopxe;7A:31:4A:FE:2E:D1;10.32.1.254;;;;server;;0;;;;SETUP;
  • OpnSense: System > Zugang > Prüfer > Lehrer-Credentials eintragen > Test sagt
    Benutzer: jhe Erfolgreich authentifiziert.
  • OpnSense: System > Einstellungen > Allgemein
    LMN-Server (10.32.1.1) als DNS gewählt
    „Erlaube das Überschreiben der DNS Serverliste durch DHCP/PPP auf WAN“ derzeit auf „ein“, hat aber auf „aus“ auch nicht funktioniert
    „Verwenden Sie den lokalen DNS-Dienst nicht als Nameserver für dieses System“ ist aus
  • System > Firmware > Erweiterungen hatte „os-web-proxy-sso“ mal als „zeakonfiguriert“ angezeigt, nach Neuinstallation jetzt aber wieder als „installiert“
  • Dienste > Web-Proxy > Einmalige Anmeldung > Kerberos-Authentifizierung zeigt zuverlässig:

  • Ich habe bereits mehrfach die Schlüsseltabelle gelöscht und anschließend neu durch Eingabe der Credentials des global-admin und „Schlüsseltabelle erstellen“ neu erstellt. Ausgabe des Prozesses:
Password for global-admin@LMN.meine-schule.de: 
 -- init_password: Wiping the computer password structure
 -- generate_new_password: Generating a new, random password for the computer account
 -- generate_new_password: Characters read from /dev/urandom: 85
 -- get_dc_host: Attempting to find domain controller to use via DNS SRV record in domain LMN.meine-schule.de for procotol tcp
 -- DnsSrvQuery: Running DNS SRV query for _kerberos._tcp.dc._msdcs.LMN.meine-schule.de
 -- validate: Found DC: server.lmn.meine-schule.de. Checking availability...
 -- get_dc_host: Found preferred domain controller: server.lmn.meine-schule.de
 -- create_fake_krb5_conf: Created fake krb5.conf file: /tmp/.msktkrb5.conf-faCMCu
 -- destroy_g_context: Destroying Kerberos context
 -- initialize_g_context: Creating Kerberos context
 -- finalize_exec: sAMAccountName: FIREWALL-K$
 -- get_short_hostname: Determined short hostname: firewall
 -- get_short_hostname: Determined short hostname: firewall
 -- try_machine_password: Trying to authenticate FIREWALL-K$ with password
 -- create_default_machine_password: Default machine password for FIREWALL-K$ is firewall-k
 -- try_machine_password: Error: krb5_get_init_creds_keytab failed: Preauthentication failed
 -- try_machine_password: Authentication with password failed
 -- try_user_creds: Checking if default ticket cache has tickets
 -- finalize_exec: Authenticated using method 5
 -- LDAPConnection: Connecting to LDAP server: server.lmn.meine-schule.de
SASL/GSSAPI authentication started
SASL username: global-admin@LMN.meine-schule.de
SASL SSF: 256
SASL data security layer installed.
 -- ldap_get_base_dn: Determined default LDAP base: dc=LMN,dc=MEINE-SCHULE,dc=DE
 -- get_default_ou: Using OU: CN=Computers,dc=LMN,dc=MEINE-SCHULE,dc=DE
 -- ldap_check_account: Checking that a computer account for FIREWALL-K$ exists
 -- ldap_check_account: Found computer account
 -- ldap_check_account: Found userAccountControl: 0x1000
 -- ldap_check_account: Found supportedEncryptionTypes: 28
 -- ldap_check_account: Found dNSHostName: firewall
 -- ldap_check_account: Found servicePrincipalName: HTTP/firewall.lmn.meine-schule.de
 -- ldap_check_account: User principal specified on command line
 -- ldap_check_account_strings: Inspecting (and updating) computer account attributes
 -- ldap_check_account_strings: Found userPrincipalName: HTTP/firewall.lmn.meine-schule.de@LMN.meine-schule.de
 -- ldap_check_account_strings: userPrincipalName should be HTTP/firewall.lmn.meine-schule.de@LMN.meine-schule.de
 -- ldap_check_account_strings: Nothing to do
 -- ldap_set_supportedEncryptionTypes: No need to change msDs-supportedEncryptionTypes they are 28
 -- ldap_set_userAccountControl_flag: Setting userAccountControl bit at 0x200000 to 0x0
 -- ldap_set_userAccountControl_flag: userAccountControl not changed 0x1000
 -- ldap_get_kvno: Found KVNO: 5
 -- set_password: Attempting to reset computer's password
 -- set_password: Try change password using user's ticket cache
 -- set_password: Successfully set password
 -- ldap_add_principal: Checking that adding principal host/firewall to FIREWALL-K$ won't cause a conflict
Error: another computer account (CN=FIREWALL,OU=server,OU=Devices,OU=default-school,OU=SCHOOLS,DC=lmn,DC=MEINE-SCHULE,DC=de) has the principal host/firewall
Error: ldap_add_principal failed
 -- remove_keytab_entries: Trying to remove entries for FIREWALL-K$ from keytab
 -- execute: Updating all entries for computer account FIREWALL-K$ in keytab WRFILE:/usr/local/etc/squid/squid.keytab
 -- update_keytab: Updating all entries for FIREWALL-K$
 -- add_principal_keytab: Adding principal to keytab: FIREWALL-K$@LMN.meine-schule.de
 -- add_principal_keytab: Using supportedEncryptionTypes: 28
 -- get_salt: Using salt: LMN.meine-schule.dehostfirewall-k.lmn.meine-schule.de
 -- add_principal_keytab:   Adding entry of enctype 0x17
 -- add_principal_keytab:   Adding entry of enctype 0x11
 -- add_principal_keytab:   Adding entry of enctype 0x12
 -- add_principal_keytab: Adding principal to keytab: FIREWALL-K$@LMN.meine-schule.de
 -- add_principal_keytab: Using supportedEncryptionTypes: 28
 -- get_salt: Using salt: LMN.meine-schule.dehostfirewall-k.lmn.meine-schule.de
 -- add_principal_keytab:   Adding entry of enctype 0x17
 -- add_principal_keytab:   Adding entry of enctype 0x11
 -- add_principal_keytab:   Adding entry of enctype 0x12
 -- add_principal_keytab: Adding principal to keytab: HTTP/firewall.lmn.meine-schule.de@LMN.meine-schule.de
 -- add_principal_keytab: Using supportedEncryptionTypes: 28
 -- get_salt: Using salt: LMN.meine-schule.dehostfirewall-k.lmn.meine-schule.de
 -- add_principal_keytab:   Adding entry of enctype 0x17
 -- add_principal_keytab:   Adding entry of enctype 0x11
 -- add_principal_keytab:   Adding entry of enctype 0x12
 -- update_keytab: Entries for SPN HTTP/firewall.lmn.meine-schule.de have already been added. Skipping ...
 -- add_keytab_entries: Trying to add missing entries for FIREWALL-K$ to keytab
 -- add_keytab_entries: Checking if HTTP/firewall.lmn.meine-schule.de needs to be added to keytab
  • Gebe ich anschließend ganz unten meine Test-Lehrer-Credentials ein und klicke auf „Kerberos Anmeldung testen“, gibt es diese Ausgabe:
Password for jhe@LMN.MEINE-SCHULE.DE: 
BH gss_accept_sec_context() failed: Invalid token was supplied. Unknown error
BH quit command

Da es ein Testsystem ist, habe ich auch bereits „linuxmuster-opnsense-reset“ ausprobiert. Das bringt diese Ausgaben:

root@server:~# linuxmuster-opnsense-reset
#### linuxmuster-opnsense-reset 2023-08-13 17:40:11                       ####
Sets the firewall to the state after setup.
Custom adjustments made since then are lost.
Note: The firewall will be restartet during the process.
Do you want to continue (YES)? YES
#### Enter the current firewall root password: 
#### Please re-enter the current firewall root password: 
#### Executing ssh command on 10.32.1.254:                                ####
#### * -> "exit"                                                          ####
#### * SSH connection successfully established.                           ####
#### Waiting for opnsense to come up                                      ####
#### Executing ssh command on 10.32.1.254:                                ####
#### * -> "exit"                                                          ####
#### * SSH connection successfully established.                           ####
#### Waiting 10 seconds.                                                  ####
#### Deleting old keytab.                                                 ####
{'response': '\n\n', 'status': 'ok'}
#### Waiting 10 seconds.                                                  ####
#### New kerberos key table has been successfully created.                ####

(Lief aber heute tagsüber auch schonmal mit dem Ergebnis „Unknown error“.) Anschließend bleibt es beim Test der Kerberos-Authentifizierung mit dem Testuser aber bei der o.g. Fehlermeldung „Invalid token was supplied. Unknown error“.

Entsprechend funktioniert auch die Authentifizierung eines Clients am Proxy nicht (man bekommt eine Eingabemaske für Username und Passwort, bei der der Testuser nicht funktioniert).

Und ja, mit den Credentials, die ich in der Opnsense ausprobiere, kann ich mich erfolgreich als Lehrer an der Schulkonsole anmelden und der User ist auch Mitglied der Gruppe „Internet“ (vermutlich alle Lehrer?):

Wer hat noch einen Tipp für mich?

Beste Grüße und schon einmal vielen Dank fürs Mitdenken,
Jens

Hallo Jens,

bitte mal nachsehen, ob nach dem Löschen der Schlüsseltabelle diese auch wirklich nicht mehr existiert. Ansonsten händisch /usr/local/etc/squid/squid.keytab auf der OPNsense löschen, squid neu starten und die Schlüsseltabelle neu anlegen lassen.

Viele Grüße
Klaus

Hallo Klaus,

danke fürs Mitdenken und Deinen Tipp. Leider scheint da alles ok zu sein: nach dem Löschen der Schlüsseltabelle ist die Datei /usr/local/etc/squid/squid.keytab gelöscht. Nach dem Neuerstellen ist sie wieder erzeugt, ein Test der Anmeldung schlägt aber genauso fehl wie bisher.

Ich habe in der Zwischenzeit weiter geschaut, was es sein kann, und m.E. deutet inzwischen alles darauf hin, dass sich die Kerberos-Encryption-Verfahren zwischen OpnSense und LMN7.2-Server nicht vertragen. Nach einem Anmeldeversuch über „Kerberos Anmeldung testen“ findet man im Log der OpnSense unter System: Protokolldateien: Backend:

Und auf dem LMN7.2-Server, dessen Samba Log level ich inzwischen auf 10 hoch gedreht habe findet man

[2023/08/15 18:42:04.069888, 10, pid=4304, effective(0, 0), real(0, 0)] ../../source4/kdc/kdc-server.c:281(kdc_tcp_call_loop)
  Received krb5 TCP packet of length 271 from ipv4:10.32.1.254:53797
[2023/08/15 18:42:04.069928, 10, pid=4304, effective(0, 0), real(0, 0)] ../../source4/kdc/kdc-heimdal.c:81(kdc_process)
  kdc_process: Received KDC packet of length 263 from ipv4:10.32.1.254:53797
[2023/08/15 18:42:04.069999,  3, pid=4304, effective(0, 0), real(0, 0), class=kerberos] ../../source4/auth/kerberos/krb5_init_context.c:80(smb_krb5_debug_wrapper)
  Kerberos: AS-REQ jhe@LMN.MEINE-SCHULE.DE from ipv4:10.32.1.254:53797 for krbtgt/LMN.MEINE-SCHULE.DE@LMN.MEINE-SCHULE.DE
[2023/08/15 18:42:04.070743,  6, pid=4304, effective(0, 0), real(0, 0)] ../../lib/util/util_ldb.c:58(gendb_search_v)
  gendb_search_v: DC=lmn,DC=meine-schule,DC=de NULL -> 1
[2023/08/15 18:42:04.072085,  6, pid=4304, effective(0, 0), real(0, 0)] ../../lib/util/util_ldb.c:58(gendb_search_v)
  gendb_search_v: DC=lmn,DC=meine-schule,DC=de NULL -> 1
[2023/08/15 18:42:04.072339,  6, pid=4304, effective(0, 0), real(0, 0)] ../../lib/util/util_ldb.c:58(gendb_search_v)
  gendb_search_v: DC=lmn,DC=meine-schule,DC=de NULL -> 1
[2023/08/15 18:42:04.072494,  3, pid=4304, effective(0, 0), real(0, 0), class=kerberos] ../../source4/auth/kerberos/krb5_init_context.c:80(smb_krb5_debug_wrapper)
  Kerberos: Client sent patypes: encrypted-timestamp, 150, 149
[2023/08/15 18:42:04.072519,  3, pid=4304, effective(0, 0), real(0, 0), class=kerberos] ../../source4/auth/kerberos/krb5_init_context.c:80(smb_krb5_debug_wrapper)
  Kerberos: Looking for PKINIT pa-data -- jhe@LMN.MEINE-SCHULE.DE
[2023/08/15 18:42:04.072544,  3, pid=4304, effective(0, 0), real(0, 0), class=kerberos] ../../source4/auth/kerberos/krb5_init_context.c:80(smb_krb5_debug_wrapper)
  Kerberos: Looking for ENC-TS pa-data -- jhe@LMN.MEINE-SCHULE.DE
[2023/08/15 18:42:04.072582,  3, pid=4304, effective(0, 0), real(0, 0), class=kerberos] ../../source4/auth/kerberos/krb5_init_context.c:80(smb_krb5_debug_wrapper)
  Kerberos: ENC-TS Pre-authentication succeeded -- jhe@LMN.MEINE-SCHULE.DE using aes256-cts-hmac-sha1-96
[2023/08/15 18:42:04.072634,  3, pid=4304, effective(0, 0), real(0, 0), class=auth_audit] ../../auth/auth_log.c:647(log_authentication_event_human_readable)
  Auth: [Kerberos KDC,ENC-TS Pre-authentication] user [(null)]\[jhe@LMN.MEINE-SCHULE.DE] at [Tue, 15 Aug 2023 18:42:04.072626 UTC] with [aes256-cts-hmac-sha1-96] status [NT_STATUS_OK] workstation [(null)] remote host [ipv4:10.32.1.254:53797] became [LMN]\[jhe] [S-1-5-21-4239855724-3324929432-2762375390-1138]. local host [NULL]
  {"timestamp": "2023-08-15T18:42:04.072703+0000", "type": "Authentication", "Authentication": {"version": {"major": 1, "minor": 2}, "eventId": 4624, "logonId": "f37a4952087e5875", "logonType": 3, "status": "NT_STATUS_OK", "localAddress": null, "remoteAddress": "ipv4:10.32.1.254:53797", "serviceDescription": "Kerberos KDC", "authDescription": "ENC-TS Pre-authentication", "clientDomain": null, "clientAccount": "jhe@LMN.MEINE-SCHULE.DE", "workstation": null, "becameAccount": "jhe", "becameDomain": "LMN", "becameSid": "S-1-5-21-4239855724-3324929432-2762375390-1138", "mappedAccount": "jhe", "mappedDomain": "LMN", "netlogonComputer": null, "netlogonTrustAccount": null, "netlogonNegotiateFlags": "0x00000000", "netlogonSecureChannelType": 0, "netlogonTrustAccountSid": null, "passwordType": "aes256-cts-hmac-sha1-96", "duration": 2792}}
[2023/08/15 18:42:04.072758,  4, pid=4304, effective(0, 0), real(0, 0), class=auth] ../../source4/auth/sam.c:203(authsam_account_ok)
  authsam_account_ok: Checking SMB password for user jhe@LMN.MEINE-SCHULE.DE
[2023/08/15 18:42:04.072814,  5, pid=4304, effective(0, 0), real(0, 0), class=auth] ../../source4/auth/sam.c:137(logon_hours_ok)
  logon_hours_ok: No hours restrictions for user jhe@LMN.MEINE-SCHULE.DE
[2023/08/15 18:42:04.072833,  5, pid=4304, effective(0, 0), real(0, 0), class=auth] ../../source4/auth/sam.c:1077(authsam_logon_success_accounting)
  lastLogonTimestamp is 133364017681818390
[2023/08/15 18:42:04.073013,  5, pid=4304, effective(0, 0), real(0, 0), class=auth] ../../source4/auth/sam.c:962(authsam_update_lastlogon_timestamp)
  sync interval is 14
[2023/08/15 18:42:04.073044,  5, pid=4304, effective(0, 0), real(0, 0), class=auth] ../../source4/auth/sam.c:979(authsam_update_lastlogon_timestamp)
  randomised sync interval is 11 (-3)
[2023/08/15 18:42:04.073058,  5, pid=4304, effective(0, 0), real(0, 0), class=auth] ../../source4/auth/sam.c:985(authsam_update_lastlogon_timestamp)
  old timestamp is 133364017681818390, threshold 133356481240728690, diff 7536441089700
[2023/08/15 18:42:04.073723, 10, pid=4304, effective(0, 0), real(0, 0)] ../../source4/dsdb/samdb/ldb_modules/acl.c:1279(acl_modify)
  ldb:acl_modify: lastLogon
[2023/08/15 18:42:04.074259,  5, pid=4304, effective(0, 0), real(0, 0), class=dsdb_audit] ../../lib/audit_logging/audit_logging.c:95(audit_log_human_text)
  DSDB Change [Modify] at [Tue, 15 Aug 2023 18:42:04.074246 UTC] status [Success] remote host [Unknown] SID [S-1-5-18] DN [CN=jhe,OU=Teachers,OU=default-school,OU=SCHOOLS,DC=lmn,DC=meine-schule,DC=de] attributes [replace: lastLogon [133365985240728690] replace: logonCount [64]]
  {"timestamp": "2023-08-15T18:42:04.074296+0000", "type": "dsdbChange", "dsdbChange": {"version": {"major": 1, "minor": 0}, "statusCode": 0, "status": "Success", "operation": "Modify", "remoteAddress": null, "performedAsSystem": false, "userSid": "S-1-5-18", "dn": "CN=jhe,OU=Teachers,OU=default-school,OU=SCHOOLS,DC=lmn,DC=meine-schule,DC=de", "transactionId": "48ff6230-ec72-479a-9604-14dcd9436718", "sessionId": "7602963a-2ea6-4553-a210-15b1142f47b2", "attributes": {"lastLogon": {"actions": [{"action": "replace", "values": [{"value": "133365985240728690"}]}]}, "logonCount": {"actions": [{"action": "replace", "values": [{"value": "64"}]}]}}}}
[2023/08/15 18:42:04.082102, 10, pid=4304, effective(0, 0), real(0, 0), class=dsdb_transaction_audit] ../../lib/audit_logging/audit_logging.c:95(audit_log_human_text)
  DSDB Transaction [commit] at [Tue, 15 Aug 2023 18:42:04.082093 UTC] duration [9001]
  {"timestamp": "2023-08-15T18:42:04.082133+0000", "type": "dsdbTransaction", "dsdbTransaction": {"version": {"major": 1, "minor": 0}, "action": "commit", "transactionId": "48ff6230-ec72-479a-9604-14dcd9436718", "duration": 9001}}
[2023/08/15 18:42:04.086334,  6, pid=4304, effective(0, 0), real(0, 0)] ../../lib/util/util_ldb.c:58(gendb_search_v)
  gendb_search_v: DC=lmn,DC=meine-schule,DC=de NULL -> 1
[2023/08/15 18:42:04.086442,  3, pid=4304, effective(0, 0), real(0, 0), class=kerberos] ../../source4/auth/kerberos/krb5_init_context.c:80(smb_krb5_debug_wrapper)
  Kerberos: AS-REQ authtime: 2023-08-15T18:42:04 starttime: unset endtime: 2023-08-16T04:42:04 renew till: 2023-08-16T18:42:04
[2023/08/15 18:42:04.086468,  3, pid=4304, effective(0, 0), real(0, 0), class=kerberos] ../../source4/auth/kerberos/krb5_init_context.c:80(smb_krb5_debug_wrapper)
  Kerberos: Client supported enctypes: aes256-cts-hmac-sha1-96, arcfour-hmac-md5, using aes256-cts-hmac-sha1-96/aes256-cts-hmac-sha1-96
[2023/08/15 18:42:04.086499,  3, pid=4304, effective(0, 0), real(0, 0), class=kerberos] ../../source4/auth/kerberos/krb5_init_context.c:80(smb_krb5_debug_wrapper)
  Kerberos: Requested flags: renewable-ok
[2023/08/15 18:42:04.086888,  3, pid=4304, effective(0, 0), real(0, 0)] ../../source4/samba/service_stream.c:67(stream_terminate_connection)
  stream_terminate_connection: Terminating connection - 'kdc_tcp_call_loop: tstream_read_pdu_blob_recv() - NT_STATUS_CONNECTION_DISCONNECTED'
[2023/08/15 18:42:04.086945, 10, pid=4304, effective(0, 0), real(0, 0)] ../../lib/messaging/messages_dgm_ref.c:163(msg_dgm_ref_destructor)
  msg_dgm_ref_destructor: refs=0x56087a21efc0
[2023/08/15 18:42:04.092081, 10, pid=4312, effective(0, 0), real(0, 0), class=dns] ../../source4/dns_server/dns_server.c:540(dns_udp_call_loop)
  Received DNS UDP packet of length 48 from ipv4:10.32.1.254:15552
[2023/08/15 18:42:04.092131,  8, pid=4312, effective(0, 0), real(0, 0), class=dns] ../../lib/util/util.c:585(dump_data_dbgc)
  [0000] 4F 04 01 00 00 01 00 00   00 00 00 00 06 73 65 72   O....... .....ser
  [0010] 76 65 72 03 6C 6D 6E 10   74 67 73 2D 66 72 65 75   ver.lmn. 
  [0020] 64 65 6E 73 74 61 64 74   02 64 65 00 00 01 00 01    .de.....
[2023/08/15 18:42:04.092176,  8, pid=4312, effective(0, 0), real(0, 0), class=dns] ../../source4/dns_server/dns_server.c:153(dns_process_send)
  {"timestamp": "2023-08-15T18:42:04.082133+0000", "type": "dsdbTransaction", "dsdbTransaction": {"version": {"major": 1, "minor": 0}, "action": "commit", "transactionId": "48ff6230-ec72-479a-9604-14dcd9436718", "duration": 9001}}
[2023/08/15 18:42:04.086334,  6, pid=4304, effective(0, 0), real(0, 0)] ../../lib/util/util_ldb.c:58(gendb_search_v)
  gendb_search_v: DC=lmn,DC=meine-schule,DC=de NULL -> 1
[2023/08/15 18:42:04.086442,  3, pid=4304, effective(0, 0), real(0, 0), class=kerberos] ../../source4/auth/kerberos/krb5_init_context.c:80(smb_krb5_debug_wrapper)
  Kerberos: AS-REQ authtime: 2023-08-15T18:42:04 starttime: unset endtime: 2023-08-16T04:42:04 renew till: 2023-08-16T18:42:04
[2023/08/15 18:42:04.086468,  3, pid=4304, effective(0, 0), real(0, 0), class=kerberos] ../../source4/auth/kerberos/krb5_init_context.c:80(smb_krb5_debug_wrapper)
  Kerberos: Client supported enctypes: aes256-cts-hmac-sha1-96, arcfour-hmac-md5, using aes256-cts-hmac-sha1-96/aes256-cts-hmac-sha1-96
[2023/08/15 18:42:04.086499,  3, pid=4304, effective(0, 0), real(0, 0), class=kerberos] ../../source4/auth/kerberos/krb5_init_context.c:80(smb_krb5_debug_wrapper)
  Kerberos: Requested flags: renewable-ok
[2023/08/15 18:42:04.086888,  3, pid=4304, effective(0, 0), real(0, 0)] ../../source4/samba/service_stream.c:67(stream_terminate_connection)
  stream_terminate_connection: Terminating connection - 'kdc_tcp_call_loop: tstream_read_pdu_blob_recv() - NT_STATUS_CONNECTION_DISCONNECTED'
[2023/08/15 18:42:04.086945, 10, pid=4304, effective(0, 0), real(0, 0)] ../../lib/messaging/messages_dgm_ref.c:163(msg_dgm_ref_destructor)
  msg_dgm_ref_destructor: refs=0x56087a21efc0
[2023/08/15 18:42:04.092081, 10, pid=4312, effective(0, 0), real(0, 0), class=dns] ../../source4/dns_server/dns_server.c:540(dns_udp_call_loop)
  Received DNS UDP packet of length 48 from ipv4:10.32.1.254:15552
[2023/08/15 18:42:04.092131,  8, pid=4312, effective(0, 0), real(0, 0), class=dns] ../../lib/util/util.c:585(dump_data_dbgc)
  [0000] 4F 04 01 00 00 01 00 00   00 00 00 00 06 73 65 72   O....... .....ser
  [0010] 76 65 72 03 6C 6D 6E 10   74 67 73 2D 66 72 65 75   ver.lmn. 
  [0020] 64 65 6E 73 74 61 64 74   02 64 65 00 00 01 00 01    .de.....
[2023/08/15 18:42:04.092176,  8, pid=4312, effective(0, 0), real(0, 0), class=dns] ../../source4/dns_server/dns_server.c:153(dns_process_send)
[2023/08/15 18:42:04.092330,  1, pid=4312, effective(0, 0), real(0, 0), class=dns] ../../librpc/ndr/ndr.c:410(ndr_print_debugc)
       &state->in_packet: struct dns_name_packet
          id                       : 0x4f04 (20228)
          operation                : 0x0100 (256)
              0x00: DNS_RCODE                 (0)
                 0: DNS_FLAG_RECURSION_AVAIL
                 1: DNS_FLAG_RECURSION_DESIRED
                 0: DNS_FLAG_TRUNCATION
                 0: DNS_FLAG_AUTHORITATIVE
              0x00: DNS_OPCODE                (0)
                 0: DNS_FLAG_REPLY
          qdcount                  : 0x0001 (1)
          ancount                  : 0x0000 (0)
          nscount                  : 0x0000 (0)
          arcount                  : 0x0000 (0)
          questions: ARRAY(1)
              questions: struct dns_name_question
                  name                     : 'server.lmn.meine-schule.de'
                  question_type            : DNS_QTYPE_A (0x1)
                  question_class           : DNS_QCLASS_IN (0x1)
          answers: ARRAY(0)
          nsrecs: ARRAY(0)
          additional: ARRAY(0)
[2023/08/15 18:42:04.093190, 10, pid=4312, effective(0, 0), real(0, 0), class=dns] ../../source4/dns_server/dnsserver_common.c:245(dns_common_lookup)
  dns_common_lookup: DNS timing: result: [WERR_OK] duration: (204) zone: [] name: [DC=server,DC=lmn.meine-schule.de,CN=MicrosoftDNS,DC=DomainDnsZones,DC=lmn,DC=meine-schule,DC=de] data: []
[2023/08/15 18:42:04.093219, 10, pid=4312, effective(0, 0), real(0, 0), class=dns] ../../source4/dns_server/dnsserver_common.c:626(dns_common_wildcard_lookup)
  dns_common_wildcard_lookup: DNS timing: result: [WERR_OK] duration: (232) zone: [] name: [DC=server,DC=lmn.meine-schule.de,CN=MicrosoftDNS,DC=DomainDnsZones,DC=lmn,DC=meine-schule,DC=de] data: []
[2023/08/15 18:42:04.093244, 10, pid=4312, effective(0, 0), real(0, 0), class=dns] ../../source4/dns_server/dns_query.c:361(add_zone_authority_record)
  Creating zone authority record for 'lmn.meine-schule.de'
[2023/08/15 18:42:04.093647, 10, pid=4312, effective(0, 0), real(0, 0), class=dns] ../../source4/dns_server/dnsserver_common.c:245(dns_common_lookup)
  dns_common_lookup: DNS timing: result: [WERR_OK] duration: (274) zone: [] name: [DC=@,DC=lmn.meine-schule.de,CN=MicrosoftDNS,DC=DomainDnsZones,DC=lmn,DC=meine-schule,DC=de] data: []
MicrosoftDNS,DC=DomainDnsZones,DC=lmn,DC=meine-schule,DC=de] data: []
[2023/08/15 18:42:04.093678,  8, pid=4312, effective(0, 0), real(0, 0), class=dns] ../../source4/dns_server/dns_server.c:263(dns_process_recv)
[2023/08/15 18:42:04.093690,  1, pid=4312, effective(0, 0), real(0, 0), class=dns] ../../librpc/ndr/ndr.c:410(ndr_print_debugc)
       &state->out_packet: struct dns_name_packet
          id                       : 0x4f04 (20228)
          operation                : 0x8580 (34176)
              0x00: DNS_RCODE                 (0)
                 1: DNS_FLAG_RECURSION_AVAIL
                 1: DNS_FLAG_RECURSION_DESIRED
                 0: DNS_FLAG_TRUNCATION
                 1: DNS_FLAG_AUTHORITATIVE
              0x00: DNS_OPCODE                (0)
                 1: DNS_FLAG_REPLY
          qdcount                  : 0x0001 (1)
          ancount                  : 0x0001 (1)
          nscount                  : 0x0001 (1)
          arcount                  : 0x0000 (0)
          questions: ARRAY(1)
              questions: struct dns_name_question
                  name                     : 'server.lmn.meine-schule.de'
                  question_type            : DNS_QTYPE_A (0x1)
                  question_class           : DNS_QCLASS_IN (0x1)
          answers: ARRAY(1)
              answers: struct dns_res_rec
                  name                     : 'server.lmn.meine-schule.de'
                  rr_type                  : DNS_QTYPE_A (0x1)
                  rr_class                 : DNS_QCLASS_IN (0x1)
                  ttl                      : 0x00000384 (900)
                  length                   : 0xffff (65535)
                  rdata                    : union dns_rdata(case 0x1)
                  ipv4_record              : 10.32.1.1
                  unexpected               : DATA_BLOB length=0
          nsrecs: ARRAY(1)
              nsrecs: struct dns_res_rec
                  name                     : 'lmn.meine-schule.de'
                  rr_type                  : DNS_QTYPE_SOA (0x6)
                  rr_class                 : DNS_QCLASS_IN (0x1)
                  ttl                      : 0x00000e10 (3600)
                  length                   : 0xffff (65535)
                  rdata                    : union dns_rdata(case 0x6)
                  soa_record: struct dns_soa_record
                      mname                    : 'server.lmn.meine-schule.de'
                      rname                    : 'hostmaster.lmn.meine-schule.de'
                      serial                   : 0x00000006 (6)
                      refresh                  : 0x00000384 (900)
                      retry                    : 0x00000258 (600)
                      expire                   : 0x00015180 (86400)
                      minimum                  : 0x00000e10 (3600)
                  unexpected               : DATA_BLOB length=0
          additional: ARRAY(0)
[2023/08/15 18:42:04.094710, 10, pid=4304, effective(0, 0), real(0, 0)] ../../lib/messaging/messages_dgm_ref.c:92(messaging_dgm_ref)
  messaging_dgm_ref: messaging_dgm_get_unique returned Success
[2023/08/15 18:42:04.094768, 10, pid=4304, effective(0, 0), real(0, 0)] ../../lib/messaging/messages_dgm_ref.c:109(messaging_dgm_ref)
  messaging_dgm_ref: unique = 10004098688105350037
[2023/08/15 18:42:04.094862, 10, pid=4304, effective(0, 0), real(0, 0)] ../../source4/kdc/kdc-server.c:281(kdc_tcp_call_loop)
  Received krb5 TCP packet of length 1957 from ipv4:10.32.1.254:53798
[2023/08/15 18:42:04.094886, 10, pid=4304, effective(0, 0), real(0, 0)] ../../source4/kdc/kdc-heimdal.c:81(kdc_process)
  kdc_process: Received KDC packet of length 1949 from ipv4:10.32.1.254:53798
[2023/08/15 18:42:04.095384,  6, pid=4304, effective(0, 0), real(0, 0)] ../../lib/util/util_ldb.c:58(gendb_search_v)
  gendb_search_v: DC=lmn,DC=meine-schule,DC=de NULL -> 1
[2023/08/15 18:42:04.095674,  6, pid=4304, effective(0, 0), real(0, 0)] ../../lib/util/util_ldb.c:58(gendb_search_v)
  gendb_search_v: DC=lmn,DC=meine-schule,DC=de NULL -> 1
[2023/08/15 18:42:04.096019,  3, pid=4304, effective(0, 0), real(0, 0), class=kerberos] ../../source4/auth/kerberos/krb5_init_context.c:80(smb_krb5_debug_wrapper)
  Kerberos: TGS-REQ jhe@LMN.MEINE-SCHULE.DE from ipv4:10.32.1.254:53798 for HTTP/firewall@LMN.MEINE-SCHULE.DE [canonicalize, renewable]
[2023/08/15 18:42:04.098059,  6, pid=4304, effective(0, 0), real(0, 0)] ../../lib/util/util_ldb.c:58(gendb_search_v)
  gendb_search_v: DC=lmn,DC=meine-schule,DC=de NULL -> 1
[2023/08/15 18:42:04.098928,  6, pid=4304, effective(0, 0), real(0, 0)] ../../lib/util/util_ldb.c:58(gendb_search_v)
  gendb_search_v: DC=lmn,DC=meine-schule,DC=de NULL -> 1
[2023/08/15 18:42:04.099254,  6, pid=4304, effective(0, 0), real(0, 0)] ../../lib/util/util_ldb.c:58(gendb_search_v)
  gendb_search_v: DC=lmn,DC=meine-schule,DC=de NULL -> 1
[2023/08/15 18:42:04.099418,  3, pid=4304, effective(0, 0), real(0, 0), class=kerberos] ../../source4/auth/kerberos/krb5_init_context.c:80(smb_krb5_debug_wrapper)
  Kerberos: Server (HTTP/firewall@LMN.MEINE-SCHULE.DE) has no supported etypes
[2023/08/15 18:42:04.099459,  3, pid=4304, effective(0, 0), real(0, 0), class=kerberos] ../../source4/auth/kerberos/krb5_init_context.c:80(smb_krb5_debug_wrapper)
  Kerberos: Failed building TGS-REP to ipv4:10.32.1.254:53798
[2023/08/15 18:42:04.099862,  3, pid=4304, effective(0, 0), real(0, 0)] ../../source4/samba/service_stream.c:67(stream_terminate_connection)
  stream_terminate_connection: Terminating connection - 'kdc_tcp_call_loop: tstream_read_pdu_blob_recv() - NT_STATUS_CONNECTION_DISCONNECTED'
[2023/08/15 18:42:04.099917, 10, pid=4304, effective(0, 0), real(0, 0)] ../../lib/messaging/messages_dgm_ref.c:163(msg_dgm_ref_destructor)
  msg_dgm_ref_destructor: refs=0x56087a21efc0

Darin lese ich als Fehlerursache v.a.

Kerberos: Client supported enctypes: aes256-cts-hmac-sha1-96, arcfour-hmac-md5, using aes256-cts-hmac-sha1-96/aes256-cts-hmac-sha1-96
Kerberos: ENC-TS Pre-authentication succeeded -- jhe@LMN.MEINE-SCHULE.DE using aes256-cts-hmac-sha1-96
Kerberos: Server (HTTP/firewall@LMN.MEINE-SCHULE.DE) has no supported etypes

Die Opnsense-Seite passt zur dortigen /etc/krb5.conf:

[libdefaults]
        default_realm = LMN.TGS-FREUDENSTADT.DE
        dns_lookup_kdc = no
        dns_lookup_realm = no
        ticket_lifetime = 24h
        default_keytab_name = /usr/local/etc/squid/squid.keytab
        default_tgs_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
        default_tkt_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
        permitted_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5

Nur auf der LMN7.2-Samba-Seite habe ich noch nicht gefunden, welche Encryptions dort verfügbar sind und wie und wo man die konfiguriert.

Kann es sein, dass sich OpnSense 23.7.1_3 und LMN 7.2 nicht mehr „verstehen“???

Schönen Abend!
Jens

Hi Jens

ohne mehr zur Lösung beitragen zu können nur die Info, dass bei uns 23.7.1_3 und sso funktioniert.

VG
Dominik

Danke,

schon mal gut zu wissen. Ich vermute aber ja, dass das schon häufiger funktioniert (oder mehreren aufgefallen wäre, wenn es überall nicht funktionieren würde). Vielleicht macht es aber ja auch einen Unterschied, ob es vor einem Update (Opnsense oder LMN-Server) schon funktioniert hat oder nicht? Oder bei mir ist (auf zwei Systemen - zuhause im Testsystem und in der Schule) was schief?

Falls niemand genaueres weiß, wie die Samba-Kerberos-Implementierung funktioniert: könnte mir ggf. jemand mal seine relevanten Dateien zum Vergleichen zuschicken (gerne auch als PM)? Mir fallen spontan

  • Opnsense: /etc/krb5.conf
  • LMN: /etc/samba/smb.conf
  • LMN: /etc/krb5.conf
  • LMN: /var/lib/samba/private/krb5.conf

ein. Kerberos-Experte auf tcpdump-Ebene wollte ich nämlich eigentlich bisher nicht werden. :grin:

Danke,
Jens

Hallo Jens,

der Fehler ist wahrscheinlich, daß bei der Schlüsseltabellengenerierung ein LDAP Server server.lmn.meine-schule.de kontaktiert wird und entsprechende Principals lmn.meine-schule.de in die Keytab eingetragen werden.

In der krb5.conf der OPNsense hast Du aber:

Wenn Du die krb5.conf in diesem Abschnitt entsprechend anpasst (default_realm), dann sollte das funktionieren.

Viele Grüße
Klaus

Hallo,

es steht überall dasselbe drin. Ich hatte die Logfiles nur anonymisiert und das bei der krb5.conf vergessen. :frowning:

Habe das jetzt auch nochmal in der squid.keytab verifiziert. Domain/Realm stimmt.

Jens

Hallo Jens,

Deine Konfigurationsdateien, welche Du mir geschickt hattest, sehen aus wie bei mir.

Du könntest folgendes auf dem Server probieren um zu sehen, welche Verschlüsselung dort benutzt wird:

root@server:~# kinit global-admin
Passwort für global-admin@LINUXMUSTER.LAN: 
root@server:~# klist -e
Ticketzwischenspeicher: FILE:/tmp/krb5cc_0
Standard-Principal: global-admin@LINUXMUSTER.LAN

Valid starting       Expires              Service principal
16.08.2023 17:25:10  17.08.2023 03:25:10  krbtgt/LINUXMUSTER.LAN@LINUXMUSTER.LAN
        erneuern bis 17.08.2023 17:25:07, Etype (Skey, TKT): aes256-cts-hmac-sha1-96, aes256-cts-hmac-sha1-96 

Bei mir sieht man, daß aes256-cts-hmac-sha1-96 verwendet wird, was auch die OPNsense dem Server anbietet.

Viele Grüße
Klaus

Hallo Klaus,

Super. Danke für den Check. Aber wieder eine Spur weniger.

Du könntest folgendes auf dem Server probieren um zu sehen, welche Verschlüsselung dort benutzt wird:

root@server:~# kinit global-admin
Password for global-admin@LMN.MEINE-SCHULE.DE: 
root@server:~# klist -e
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: global-admin@LMN.MEINE-SCHULE.DE

Valid starting       Expires              Service principal
16.08.2023 16:04:57  17.08.2023 02:04:57  krbtgt/LMN.MEINE-SCHULE.DE@LMN.MEINE-SCHULE.DE
	renew until 17.08.2023 16:04:54, Etype (skey, tkt): aes256-cts-hmac-sha1-96, aes256-cts-hmac-sha1-96

Sieht gut aus, oder? Genau dasselbe, was auch der Client (die Opnsense) anbietet.

Jens

Hallo Jens,

wirklich eine harte Nuß…

Du könntest jetzt noch probieren:
OpnSense: System > Einstellungen > Allgemein
[x] „Verwenden Sie den lokalen DNS-Dienst nicht als Nameserver für dieses System“

Dann sollten auch alle Haken in der OPNsense Kerberos Authentifizierung „grün“ sein.

Dann die Schlüsseltabelle neu erstellen lassen.

Dann einfach mal mit einem Windows Client und „ActiveDirectory Benutzer und Computer“ in den Eigenschaften des Users unter Konto in den Kontooptionen alle Haken deaktivieren, falls welche aktiviert sind.

Dann könntest Du noch testen, das Kennwort für den User über die Schulkonsole zurückzusetzen.

Viel Erfolg!

Grüße Klaus

EDIT:
Mir ist nämlich aufgefallen daß Deine squid.keytab doch anders ist als meine. Du hast:

Keytab name: FILE:/usr/local/etc/squid/squid.keytab
KVNO Principal
---- --------------------------------------------------------------------------
  15 FIREWALL-K$@LMN.MEINE-SCHULE.DE
  15 FIREWALL-K$@LMN.MEINE-SCHULE.DE
  15 FIREWALL-K$@LMN.MEINE-SCHULE.DE
  15 HTTP/firewall.lmn.meine-schule.de@LMN.MEINE-SCHULE.DE
  15 HTTP/firewall.lmn.meine-schule.de@LMN.MEINE-SCHULE.DE
  15 HTTP/firewall.lmn.meine-schule.de@LMN.MEINE-SCHULE.DE

Ich habe hier noch 3 Einträge mehr und nach diesem Principal (HTTP/firewall@LMN.MEINE-SCHULE.DE) wird im Request auch gefragt. Weiß aber nicht ob das relevant ist.

Siehe hier bei mir:

Keytab name: FILE:/usr/local/etc/squid/squid.keytab
KVNO Principal
---- --------------------------------------------------------------------------
   5 FIREWALL-K$@LINUXMUSTER.LAN
   5 FIREWALL-K$@LINUXMUSTER.LAN
   5 FIREWALL-K$@LINUXMUSTER.LAN
   5 HTTP/firewall.linuxmuster.lan@LINUXMUSTER.LAN
   5 HTTP/firewall.linuxmuster.lan@LINUXMUSTER.LAN
   5 HTTP/firewall.linuxmuster.lan@LINUXMUSTER.LAN
   5 HTTP/firewall@LINUXMUSTER.LAN
   5 HTTP/firewall@LINUXMUSTER.LAN
   5 HTTP/firewall@LINUXMUSTER.LAN

Hallo Klaus,

danke für Deine unermütliche Bereitschaft mitzudenken.

Ich habe jetzt die Einstellung unter System > Einstellung > Allgemein geändert und dann sind in der Tat im Web-Proxy alle Haken grün.

Dann Schlüsseltabelle neu erstellen lassen:

Password for global-admin@LMN.MEINE-SCHULE.DE: 
 -- init_password: Wiping the computer password structure
 -- generate_new_password: Generating a new, random password for the computer account
 -- generate_new_password: Characters read from /dev/urandom: 79
 -- get_dc_host: Attempting to find domain controller to use via DNS SRV record in domain LMN.MEINE-SCHULE.DE for procotol tcp
 -- DnsSrvQuery: Running DNS SRV query for _kerberos._tcp.dc._msdcs.LMN.MEINE-SCHULE.DE
 -- validate: Found DC: server.lmn.meine-schule.de. Checking availability...
 -- get_dc_host: Found preferred domain controller: server.lmn.meine-schule.de
 -- create_fake_krb5_conf: Created fake krb5.conf file: /tmp/.msktkrb5.conf-lLWpc7
 -- destroy_g_context: Destroying Kerberos context
 -- initialize_g_context: Creating Kerberos context
 -- finalize_exec: sAMAccountName: FIREWALL-K$
 -- get_short_hostname: Determined short hostname: firewall
 -- get_short_hostname: Determined short hostname: firewall
 -- try_machine_password: Trying to authenticate FIREWALL-K$ with password
 -- create_default_machine_password: Default machine password for FIREWALL-K$ is firewall-k
 -- try_machine_password: Error: krb5_get_init_creds_keytab failed: Preauthentication failed
 -- try_machine_password: Authentication with password failed
 -- try_user_creds: Checking if default ticket cache has tickets
 -- finalize_exec: Authenticated using method 5
 -- LDAPConnection: Connecting to LDAP server: server.lmn.meine-schule.de
SASL/GSSAPI authentication started
SASL username: global-admin@LMN.MEINE-SCHULE.DE
SASL SSF: 256
SASL data security layer installed.
 -- ldap_get_base_dn: Determined default LDAP base: dc=LMN,dc=MEINE-SCHULE,dc=DE
 -- get_default_ou: Using OU: CN=Computers,dc=LMN,dc=MEINE-SCHULE,dc=DE
 -- ldap_check_account: Checking that a computer account for FIREWALL-K$ exists
 -- ldap_check_account: Found computer account
 -- ldap_check_account: Found userAccountControl: 0x1000
 -- ldap_check_account: Found supportedEncryptionTypes: 28
 -- ldap_check_account: Found dNSHostName: firewall -- ldap_check_account: Found servicePrincipalName: HTTP/firewall.lmn.meine-schule.de
 -- ldap_check_account: User principal specified on command line
 -- ldap_check_account_strings: Inspecting (and updating) computer account attributes
 -- ldap_check_account_strings: Found userPrincipalName: HTTP/firewall.lmn.meine-schule.de@LMN.MEINE-SCHULE.DE
 -- ldap_check_account_strings: userPrincipalName should be HTTP/firewall.lmn.meine-schule.de@LMN.MEINE-SCHULE.DE
 -- ldap_check_account_strings: Nothing to do
 -- ldap_set_supportedEncryptionTypes: No need to change msDs-supportedEncryptionTypes they are 28
 -- ldap_set_userAccountControl_flag: Setting userAccountControl bit at 0x200000 to 0x0
 -- ldap_set_userAccountControl_flag: userAccountControl not changed 0x1000
 -- ldap_get_kvno: Found KVNO: 1
 -- set_password: Attempting to reset computer's password
 -- set_password: Try change password using user's ticket cache
 -- set_password: Successfully set password
 -- ldap_add_principal: Checking that adding principal host/firewall to FIREWALL-K$ won't cause a conflict
Error: another computer account (CN=FIREWALL,OU=server,OU=Devices,OU=default-school,OU=SCHOOLS,DC=lmn,DC=meine-schule,DC=de) has the principal host/firewall
Error: ldap_add_principal failed
 -- remove_keytab_entries: Trying to remove entries for FIREWALL-K$ from keytab
 -- execute: Updating all entries for computer account FIREWALL-K$ in keytab WRFILE:/usr/local/etc/squid/squid.keytab
 -- update_keytab: Updating all entries for FIREWALL-K$
 -- add_principal_keytab: Adding principal to keytab: FIREWALL-K$@LMN.MEINE-SCHULE.DE
 -- add_principal_keytab: Using supportedEncryptionTypes: 28
 -- get_salt: Using salt: LMN.MEINE-SCHULE.DEhostfirewall-k.lmn.meine-schule.de
 -- add_principal_keytab:   Adding entry of enctype 0x17
 -- add_principal_keytab:   Adding entry of enctype 0x11
 -- add_principal_keytab:   Adding entry of enctype 0x12
 -- add_principal_keytab: Adding principal to keytab: FIREWALL-K$@LMN.MEINE-SCHULE.DE
 -- add_principal_keytab: Using supportedEncryptionTypes: 28
 -- get_salt: Using salt: LMN.MEINE-SCHULE.DEhostfirewall-k.lmn.meine-schule.de
 -- add_principal_keytab:   Adding entry of enctype 0x17
 -- add_principal_keytab:   Adding entry of enctype 0x11
 -- add_principal_keytab:   Adding entry of enctype 0x12
 -- add_principal_keytab: Adding principal to keytab: HTTP/firewall.lmn.meine-schule.de@LMN.MEINE-SCHULE.DE
 -- add_principal_keytab: Using supportedEncryptionTypes: 28
 -- get_salt: Using salt: LMN.MEINE-SCHULE.DEhostfirewall-k.lmn.meine-schule.de
 -- add_principal_keytab:   Adding entry of enctype 0x17
 -- add_principal_keytab:   Adding entry of enctype 0x11
 -- add_principal_keytab:   Adding entry of enctype 0x12
 -- update_keytab: Entries for SPN HTTP/firewall.lmn.meine-schule.de have already been added. Skipping ...
 -- add_keytab_entries: Trying to add missing entries for FIREWALL-K$ to keytab
 -- add_keytab_entries: Checking if HTTP/firewall.lmn.meine-schule.de needs to be added to keytab

Erste Frage ist: sieht das bei anderen auch so aus, dass es ein Problem damit gibt, dass es schon einen entsprechenden Computer-Account gibt? Dann fällt mir noch auf, dass zumindest in dem Log-Ausschnitt sich LMN-Server und Opnsense über die Encryption Types (28) einig sind …

Und dann werden ja im letzten Teil Entries nicht angelegt:

 -- update_keytab: Entries for SPN HTTP/firewall.lmn.meine-schule.de have already been added. Skipping ...

Habe ich irgendwo einen falschen DNS-Eintrag?

Das Keytab hat dann auch wieder nur die sechs Einträge (wie lässt Du Dir Deine Keytab eigentlich anzeigen? In der Opnsense-Oberfläche oder gibt es dafür einen Befehl, den ich noch nicht kenne?).

Keytab name: FILE:/usr/local/etc/squid/squid.keytab
KVNO Principal
---- --------------------------------------------------------------------------
   2 FIREWALL-K$@LMN.MEINE-SCHULE.DE
   2 FIREWALL-K$@LMN.MEINE-SCHULE.DE
   2 FIREWALL-K$@LMN.MEINE-SCHULE.DE
   2 HTTP/firewall.lmn.meine-schule.de@LMN.MEINE-SCHULE.DE
   2 HTTP/firewall.lmn.meine-schule.de@LMN.MEINE-SCHULE.DE
   2 HTTP/firewall.lmn.meine-schule.de@LMN.MEINE-SCHULE.DE

Da fehlt dann wieder was …

Ich habe dann einen weiteren User angelegt, nur um sicher zu sein. Aber auch bei dem schlägt der Test fehl:

Password for max@LMN.TGS-FREUDENSTADT.DE: 
BH gss_accept_sec_context() failed: Invalid token was supplied. Unknown error
BH quit command

Einen Windows-Client hab ich grad nicht griffbereit. Wenn der aber hilfreich ist, baue ich einen …

Jens

Hallo Jens,

Ja, das sieht bei mir genauso aus.

Mit ktutil:

root@firewall:~ # ktutil
ktutil:  rkt /usr/local/etc/squid/squid.keytab
ktutil:  l
slot KVNO Principal
---- ---- ---------------------------------------------------------------------
   1    6              FIREWALL-K$@LINUXMUSTER.LAN
   2    6              FIREWALL-K$@LINUXMUSTER.LAN
   3    6              FIREWALL-K$@LINUXMUSTER.LAN
   4    6 HTTP/firewall.linuxmuster.lan@LINUXMUSTER.LAN
   5    6 HTTP/firewall.linuxmuster.lan@LINUXMUSTER.LAN
   6    6 HTTP/firewall.linuxmuster.lan@LINUXMUSTER.LAN
   7    6            HTTP/firewall@LINUXMUSTER.LAN
   8    6            HTTP/firewall@LINUXMUSTER.LAN
   9    6            HTTP/firewall@LINUXMUSTER.LAN
ktutil:  

Die Frage ist jetzt, wieso die SPN bei Dir nicht alle angelegt werden, bzw. warum diese nicht auf dem Server existieren, bzw. wie man die auf dem Server anlegt. Und ob das überhaupt relevant für Dein Problem ist. Wäre mal interessant, wie die Schlüsseltabelle bei jemand andern aussieht, bei dem SSO funktioniert.

Es gibt auf dem Server:

root@server:~# samba-tool domain exportkeytab /tmp/keytab
Export complete keytab to /tmp/keytab

Dann kann man sich die Keytab wieder mit ktutil ansehen. Daraus werde ich aber auch nicht schlauer.

Ich glaube nicht, daß das notwendig ist, wenn es auch mit einem neuen User nicht funktioniert.
Du könntest auch nachsehen, ob eine bestimmte Verschlüsselung für den User eingestellt wurde über:

root@server:~# net ads enctypes list max -U global-admin

Wenn da kommt no msDS-SupportedEncryptionTypes attribute found, dann wurde nichts gesetzt. Wenn schon mal enctypes für den User gesetzt und dann wieder entfernt wurden dann kommt z.B.:

'max' uses "msDS-SupportedEncryptionTypes": 0 (0x00000000)
[ ] 0x00000001 DES-CBC-CRC
[ ] 0x00000002 DES-CBC-MD5
[ ] 0x00000004 RC4-HMAC
[ ] 0x00000008 AES128-CTS-HMAC-SHA1-96
[ ] 0x00000010 AES256-CTS-HMAC-SHA1-96
[ ] 0x00000020 AES256-CTS-HMAC-SHA1-96-SK
[ ] 0x00080000 RESOURCE-SID-COMPRESSION-DISABLED

Viele Grüße
Klaus

Hallo Klaus,

jetzt arbeite ich erst mal die von Dir angesprochenen Punkte ab; nicht, dass wir da etwas übersehen:

Wenn ich den Befehl ausführe, gibt es schon mal einen „Stall voll“ Meldungen mit Will try to delete old keytab entries:

root@server:~# samba-tool domain exportkeytab /tmp/keytab
INFO: Current debug levels:
  all: 5
  tdb: 5
  printdrivers: 5
  lanman: 5
  smb: 5
  rpc_parse: 5
  rpc_srv: 5
  rpc_cli: 5
  passdb: 5
  sam: 5
  auth: 5
  winbind: 5
  vfs: 5
  idmap: 5
  quota: 5
  acls: 5
  locking: 5
  msdfs: 5
  dmapi: 5
  registry: 5
  scavenger: 5
  dns: 5
  ldb: 5
  tevent: 5
  auth_audit: 5
  auth_json_audit: 5
  kerberos: 5
  drs_repl: 5
  smb2: 5
  smb2_credits: 5
  dsdb_audit: 5
  dsdb_json_audit: 5
  dsdb_password_audit: 5
  dsdb_password_json_audit: 5
  dsdb_transaction_audit: 5
  dsdb_transaction_json_audit: 5
  dsdb_group_audit: 5
  dsdb_group_json_audit: 5
Processing section "[netlogon]"
Processing section "[sysvol]"
Processing section "[printers]"
Processing section "[print$]"
pm_process() returned Yes
GENSEC backend 'gssapi_spnego' registered
GENSEC backend 'gssapi_krb5' registered
GENSEC backend 'gssapi_krb5_sasl' registered
GENSEC backend 'spnego' registered
GENSEC backend 'schannel' registered
GENSEC backend 'naclrpc_as_system' registered
GENSEC backend 'sasl-EXTERNAL' registered
GENSEC backend 'ntlmssp' registered
GENSEC backend 'ntlmssp_resume_ccache' registered
GENSEC backend 'http_basic' registered
GENSEC backend 'http_ntlm' registered
GENSEC backend 'http_negotiate' registered
GENSEC backend 'krb5' registered
GENSEC backend 'fake_gssapi_krb5' registered
added interface ens18 ip=10.32.1.1 bcast=10.47.255.255 netmask=255.240.0.0
added interface ens18 ip=10.32.1.1 bcast=10.47.255.255 netmask=255.240.0.0
schema_fsmo_init: we are master[yes] updates allowed[no]
Export complete keytab to /tmp/keytab
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0012
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (global-binduser@LMN.MEINE-SCHULE.DE) with encryption type (18) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0011
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [18] for principal: global-binduser@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (global-binduser@LMN.MEINE-SCHULE.DE) with encryption type (17) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0017
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [18] for principal: global-binduser@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [17] for principal: global-binduser@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (global-binduser@LMN.MEINE-SCHULE.DE) with encryption type (23) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0012
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (krbtgt@LMN.MEINE-SCHULE.DE) with encryption type (18) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0012
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (global-admin@LMN.MEINE-SCHULE.DE) with encryption type (18) and version (3)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0011
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [3] enctype [18] for principal: global-admin@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (global-admin@LMN.MEINE-SCHULE.DE) with encryption type (17) and version (3)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0017
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [3] enctype [18] for principal: global-admin@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [3] enctype [17] for principal: global-admin@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (global-admin@LMN.MEINE-SCHULE.DE) with encryption type (23) and version (3)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0012
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (gast1@LMN.MEINE-SCHULE.DE) with encryption type (18) and version (2)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0011
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [2] enctype [18] for principal: gast1@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (gast1@LMN.MEINE-SCHULE.DE) with encryption type (17) and version (2)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0017
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [2] enctype [18] for principal: gast1@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [2] enctype [17] for principal: gast1@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (gast1@LMN.MEINE-SCHULE.DE) with encryption type (23) and version (2)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0012
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (heinz@LMN.MEINE-SCHULE.DE) with encryption type (18) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0011
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [18] for principal: heinz@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (heinz@LMN.MEINE-SCHULE.DE) with encryption type (17) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0017
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [18] for principal: heinz@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [17] for principal: heinz@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (heinz@LMN.MEINE-SCHULE.DE) with encryption type (23) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0012
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (jhe@LMN.MEINE-SCHULE.DE) with encryption type (18) and version (4)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0011
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [4] enctype [18] for principal: jhe@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (jhe@LMN.MEINE-SCHULE.DE) with encryption type (17) and version (4)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0017
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [4] enctype [18] for principal: jhe@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [4] enctype [17] for principal: jhe@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (jhe@LMN.MEINE-SCHULE.DE) with encryption type (23) and version (4)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0012
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (mailcow-binduser@LMN.MEINE-SCHULE.DE) with encryption type (18) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0011
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [18] for principal: mailcow-binduser@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (mailcow-binduser@LMN.MEINE-SCHULE.DE) with encryption type (17) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0017
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [18] for principal: mailcow-binduser@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [17] for principal: mailcow-binduser@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (mailcow-binduser@LMN.MEINE-SCHULE.DE) with encryption type (23) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0012
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (Administrator@LMN.MEINE-SCHULE.DE) with encryption type (18) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0011
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [18] for principal: Administrator@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (Administrator@LMN.MEINE-SCHULE.DE) with encryption type (17) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0017
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [18] for principal: Administrator@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [17] for principal: Administrator@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (Administrator@LMN.MEINE-SCHULE.DE) with encryption type (23) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0012
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (pgmadmin@LMN.MEINE-SCHULE.DE) with encryption type (18) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0011
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [18] for principal: pgmadmin@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (pgmadmin@LMN.MEINE-SCHULE.DE) with encryption type (17) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0017
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [18] for principal: pgmadmin@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [17] for principal: pgmadmin@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (pgmadmin@LMN.MEINE-SCHULE.DE) with encryption type (23) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0012
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (TESTMINT1$@LMN.MEINE-SCHULE.DE) with encryption type (18) and version (3)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0011
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [3] enctype [18] for principal: TESTMINT1$@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (TESTMINT1$@LMN.MEINE-SCHULE.DE) with encryption type (17) and version (3)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0017
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [3] enctype [18] for principal: TESTMINT1$@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [3] enctype [17] for principal: TESTMINT1$@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (TESTMINT1$@LMN.MEINE-SCHULE.DE) with encryption type (23) and version (3)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0012
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (SERVER$@LMN.MEINE-SCHULE.DE) with encryption type (18) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0011
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [18] for principal: SERVER$@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (SERVER$@LMN.MEINE-SCHULE.DE) with encryption type (17) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0017
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [18] for principal: SERVER$@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [17] for principal: SERVER$@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (SERVER$@LMN.MEINE-SCHULE.DE) with encryption type (23) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0012
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (max@LMN.MEINE-SCHULE.DE) with encryption type (18) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0011
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [18] for principal: max@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (max@LMN.MEINE-SCHULE.DE) with encryption type (17) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0017
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [18] for principal: max@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [1] enctype [17] for principal: max@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (max@LMN.MEINE-SCHULE.DE) with encryption type (23) and version (1)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0012
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (FIREWALL-K$@LMN.MEINE-SCHULE.DE) with encryption type (18) and version (3)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0011
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [3] enctype [18] for principal: FIREWALL-K$@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (FIREWALL-K$@LMN.MEINE-SCHULE.DE) with encryption type (17) and version (3)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0017
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [3] enctype [18] for principal: FIREWALL-K$@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [3] enctype [17] for principal: FIREWALL-K$@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (FIREWALL-K$@LMN.MEINE-SCHULE.DE) with encryption type (23) and version (3)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0012
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (dns-admin@LMN.MEINE-SCHULE.DE) with encryption type (18) and version (2)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0011
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [2] enctype [18] for principal: dns-admin@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (dns-admin@LMN.MEINE-SCHULE.DE) with encryption type (17) and version (2)
sdb_kt_copy: smb_krb5_kt_add_entry for enctype=0x0017
../../lib/krb5_wrap/krb5_samba.c:1641: Will try to delete old keytab entries
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [2] enctype [18] for principal: dns-admin@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1719: Saving entry with kvno [2] enctype [17] for principal: dns-admin@LMN.MEINE-SCHULE.DE.
../../lib/krb5_wrap/krb5_samba.c:1881: adding keytab entry for (dns-admin@LMN.MEINE-SCHULE.DE) with encryption type (23) and version (2)

Ist das normal?
Schaue ich dann die exportierte keytab an, sieht das so aus:

root@server:~# ktutil
ktutil:  rkt /tmp/keytab
ktutil:  l
slot KVNO Principal
---- ---- ---------------------------------------------------------------------
   1    1  global-binduser@LMN.MEINE-SCHULE.DE
   2    1  global-binduser@LMN.MEINE-SCHULE.DE
   3    1  global-binduser@LMN.MEINE-SCHULE.DE
   4    1           krbtgt@LMN.MEINE-SCHULE.DE
   5    3     global-admin@LMN.MEINE-SCHULE.DE
   6    3     global-admin@LMN.MEINE-SCHULE.DE
   7    3     global-admin@LMN.MEINE-SCHULE.DE
   8    2            gast1@LMN.MEINE-SCHULE.DE
   9    2            gast1@LMN.MEINE-SCHULE.DE
  10    2            gast1@LMN.MEINE-SCHULE.DE
  11    1            heinz@LMN.MEINE-SCHULE.DE
  12    1            heinz@LMN.MEINE-SCHULE.DE
  13    1            heinz@LMN.MEINE-SCHULE.DE
  14    4              jhe@LMN.MEINE-SCHULE.DE
  15    4              jhe@LMN.MEINE-SCHULE.DE
  16    4              jhe@LMN.MEINE-SCHULE.DE
  17    1 mailcow-binduser@LMN.MEINE-SCHULE.DE
  18    1 mailcow-binduser@LMN.MEINE-SCHULE.DE
  19    1 mailcow-binduser@LMN.MEINE-SCHULE.DE
  20    1    Administrator@LMN.MEINE-SCHULE.DE
  21    1    Administrator@LMN.MEINE-SCHULE.DE
  22    1    Administrator@LMN.MEINE-SCHULE.DE
  23    1         pgmadmin@LMN.MEINE-SCHULE.DE
  24    1         pgmadmin@LMN.MEINE-SCHULE.DE
  25    1         pgmadmin@LMN.MEINE-SCHULE.DE
  26    3       TESTMINT1$@LMN.MEINE-SCHULE.DE
  27    3       TESTMINT1$@LMN.MEINE-SCHULE.DE
  28    3       TESTMINT1$@LMN.MEINE-SCHULE.DE
  29    1          SERVER$@LMN.MEINE-SCHULE.DE
  30    1          SERVER$@LMN.MEINE-SCHULE.DE
  31    1          SERVER$@LMN.MEINE-SCHULE.DE
  32    1              max@LMN.MEINE-SCHULE.DE
  33    1              max@LMN.MEINE-SCHULE.DE
  34    1              max@LMN.MEINE-SCHULE.DE
  35    3      FIREWALL-K$@LMN.MEINE-SCHULE.DE
  36    3      FIREWALL-K$@LMN.MEINE-SCHULE.DE
  37    3      FIREWALL-K$@LMN.MEINE-SCHULE.DE
  38    2        dns-admin@LMN.MEINE-SCHULE.DE
  39    2        dns-admin@LMN.MEINE-SCHULE.DE
  40    2        dns-admin@LMN.MEINE-SCHULE.DE

Das sieht bei mir für alle User, mit denen ich Kerberos-Authentifizierungen versucht habe, gleich aus:

root@server:~# net ads enctypes list max -U global-admin
Password for [LMN\global-admin]:
kerberos_kinit_password LMN@LMN.MEINE-SCHULE.DE failed: Client not found in Kerberos database
no msDS-SupportedEncryptionTypes attribute found
root@server:~# net ads enctypes list jhe -U global-admin
Password for [LMN\global-admin]:
kerberos_kinit_password LMN@LMN.MEINE-SCHULE.DE failed: Client not found in Kerberos database
no msDS-SupportedEncryptionTypes attribute found

Beste Grüße,
Jens

Nächstes Update:

Ich habe mir jetzt mal testweise einen neuen LMN7.2-Server „from scratch“ aufgesetzt. Anschließend hatte auch meine keytab zunächst die neun Einträge. Ein Test-Login über „Kerberos Anmeldung testen“ funktionierte trotzdem nicht.

Nach Löschen der Schlüsseltabelle und Neuerstellung habe ich wieder nur sechs Einträge in der keytab und der Test funktioniert weiter nicht. :frowning:

Als nächstes werde ich wohl die Opnsense mal neu aufsetzen, oder hat noch jemand eine bessere Idee?

Schönen Abend und wie immer danke fürs Mitdenken!
Jens

Hallo Jens,

Das kommt vom hohen Loglevel in der smb.conf. Kann ich so reproduzieren.

Wenn es schon nicht am Server liegt, dann kann es ja hoffentlich „nur“ noch die OPNsense sein. Du könntest Dir ja die jetzige OPNsense Konfiguration sichern. So könntest Du, wenn die Neuinstallation nichts bringt diese einfach wieder zurückspielen. Oder einen Snapshot der Virtuellen Maschine machen, falls es eine VM ist.

Ansonsten bin ich mit meinem Latein auch am Ende.

Viel Erfolg und Grüße
Klaus

Hallo,

nun habe ich auf meinem Proxmox meine bisherigen LMN-VM’s (server und opnsense) mal runtergefahren und zwei ganz frische VM’s mit OpnSense und LMN 7.1 Server (bewusst 7.1, da das ja offenbar eigentlich bei allen funktioniert) gem. Anleitung auf docs.linuxmuster.net aufgesetzt.

Und das Ergebnis: das Problem bleibt dasselbe wie oben länglich beschrieben.

Irgendwas muss ich ja falsch machen, dass es bei allen geht, nur bei mir nicht, aber so langsam gehen mir die Ideen aus, wie ich mich dem Problem noch nähern soll …

Hat noch jemand noch eine gute Idee?

Beste Grüße,
Jens

Hallo Jens,

dann kann ich mir nur noch vorstellen, daß es irgendwie daran liegen könnte, daß Du intern eine externe Domain verwendest. Evtl. auch in Zusammenhang mit IPv6 und DNS?

Nur mal so als Gedanke.

Viele Grüße
Klaus

Hallo Klaus,

nochmal mein Dank fürs unermüdliche Mitdenken und Deine Ideen/Vorschläge!

Ich hatte bei der Test-Neuinstallation gestern mit LMN 7.1-Server bewusst versucht, an allen Stellen an der Anleitung zu bleiben und habe daher als Domain der Testinstallation „lmn.linuxmuster.lan“ gewählt. Sollte kein Problem sein, oder?

Dann musste ich im Vergleich zu dem, was linuxmuster-setup hinterlassen hatte unter System>Einstellungen>Allgemein noch „Erlaube das Überschreiben der DNS Serverliste durch DHCP/PPP auf WAN“ ausschalten und „Verwenden Sie den lokalen DNS-Dienst nicht als Nameserver für dieses System“ einschalten. Das passt auch, richtig? Anschließend sind beim SSO alle Haken grün.

Und noch zu den einfachen Fehlerursachen: auf der Seite Dienste>Web-Proxy>Einmalige Anmeldung>Kerberos-Authentifizierung: um die Verbindung zu testen, gebe ich hier

schon den User einfach so an, wie er in der Schulkonsole heißt (z.B. „jhe“) und nicht eine spezielle Syntax („lmn\jhe“) oder sowas. Korrekt?

Beste Grüße,
Jens

Hallo Jens,

Ja gerne. Interessiert mich selber.

Und weil es mir nicht vorstellen konnte, daß es an der Subdomain „lmn“ liegt, habe ich auf meinem 7.2 Testsystem selber nochmal linuxmuster-setup mit „lmn.linuxmuster.lan“ aufgerufen. Das Setup läuft ohne Fehlermeldung sauber durch. Danach einen Lehreraccount angelegt, auf der OPNsense die Schlüsseltabelle erfolgreich erstellt - und dann:
Ich kann Deinen Fehler reproduzieren, selbe Fehlermeldung in OPNsense Backend Log beim Versuch die Kerberos Anmeldung mit dem eben angelegten User zu testen.

Scheint also irgendein Bug zu sein. Entweder in der OPNsense, oder in linuxmuster-setup.

Viele Grüße
Klaus

… und noch eine Ergänzung:
Rufe ich linuxmuster-setup erneut auf und konfiguriere mit der DNS-Domain „linuxmuster.lan“ dann klappt mein SSO auch nicht mehr. Liegt also nicht an der Subdomain.