Qnap Einbindung in UCS Domain

Hallo,

ich habe einen UCS “Master” hier laufen. Nun versuche ich eine Qnap TS-451 mit aktuellster Firmware in die UCS domäne zu bringen.

Das scheitert leider. Ja, die Qnap steht in einem anderen Netzwerk als der UCS, und dazwischen ist ein Router/ Firewall. Dort sind aber alle Ports freigegeben und nichts wird blockiert.
Das ist die Ausgabe der Qnap:

[code]Microsoft-Netzwerkeinstellungen fehlgeschlagen. Bitte prüfen Sie den DNS-Server, den Domänennamen, den Benutzernamen und das Kennwort für das Anmelden bei der Domäne.

======== DEBUG START =======
/usr/local/samba/bin/net time set -S UCS.k…de
[command] echo ******** | /usr/bin/kinit “administrator@K…DE”
Password for administrator@K…DE:
Specify WORKGROUP = K…
[command] /usr/local/samba/bin/net ads join -S UCS -U “administrator%" -s /etc/config/smb.conf
Failed to join domain: failed to lookup DC info for domain ‘K…DE’ over rpc: Undetermined error
[command] /usr/local/samba/bin/net ads join -S UCS.k…de -U "administrator%
” -s /etc/config/smb.conf
Failed to join domain: failed to join domain ‘K…DE’ over rpc: NT_STATUS_NONE_MAPPED
[command] /usr/local/samba/bin/net ads join -U “administrator%" -s /etc/config/smb.conf
Failed to join domain: failed to join domain ‘K…DE’ over rpc: NT_STATUS_NONE_MAPPED
[command] /usr/local/samba/bin/net rpc join -S UCS -U "administrator%
” -s /etc/config/smb.conf
Unable to find a suitable server for domain K…
Unable to find a suitable server for domain K…
[command] /usr/local/samba/bin/net rpc join -S UCS.k…de -U “administrator%" -s /etc/config/smb.conf
error looking up rid for user qnap$: NT_STATUS_NONE_MAPPED/NT_STATUS_NONE_MAPPED
Unable to join domain K…
[command] /usr/local/samba/bin/net rpc join -U "administrator%
” -s /etc/config/smb.conf
Unable to find a suitable server for domain K…
Unable to find a suitable server for domain K…[/code]

Jemand eine Idee? Ist vielleicht etwas falsch konfiguriert?

Danke!
/KNEBB

der konfigurierte DNS Server auf der Qnap NAS Box muss auf jeden Fall der UCS Server sein - sonst findet dise den DC nicht !!
ist dies bei Ihnen der Fall ?

LG

Christian

Hallo,

ja, der (einzig konfigurierte) DNS ist der UCS Server:

[~] # nslookup ucs.knebb.de
Server:     ucs.k....de
Address:    192.168.xx.10

Name:       ucs.k....de
Address:    192.168.xx.10
[~] #

Moin,

haben Sie auf Ihrem UCS-System denn überhaupt Samba im Active Directory-Modus installiert? Genauer: die App »Active Directory-compatible Domain Controller« bzw. die Debian-Pakete »univention-samba4« und »univention-s4-connector«?

Weiterhin: was ergeben diese Befehle, wenn sie auf dem UCS-Master ausgeführt werden:

host -t SRV _ldap._tcp.$(ucr get domainname) univention-ldapsearch relativeDomainName=_ldap._tcp dpkg -l 'univention-s*'

Gruß,
mosu

Hallo,

ja, das sollte alles korrekt sein:

root@ucs:/# host -t SRV _ldap._tcp.$(ucr get domainname)
_ldap._tcp.k***.de has SRV record 0 100 389 ucs.k***.de.

root@ucs:/# univention-ldapsearch relativeDomainName=_ldap._tcp
# extended LDIF
#
# LDAPv3
# base <dc=k***,dc=de> (default) with scope subtree
# filter: relativeDomainName=_ldap._tcp
# requesting: ALL
#

# _ldap._tcp, k***.de, dns, k***.de
dn: relativeDomainName=_ldap._tcp,zoneName=k***.de,cn=dns,dc=k***,dc=de
objectClass: top
objectClass: dNSZone
objectClass: univentionObject
univentionObjectType: dns/srv_record
dNSTTL: 10800
relativeDomainName: _ldap._tcp
zoneName: k***.de
sRVRecord: 0 100 389 ucs.k***.de.

# search result
search: 3
result: 0 Success

# numResponses: 2
# numEntries: 1
root@ucs:/# dpkg -l 'univention-s*'
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
         Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name            Version      Architektur  Beschreibung
+++-===============-============-============-====================================
ii  univention-s4-c 10.0.1-20.62 all          UCS - Modules for sync UCS and Samba
rc  univention-samb 9.0.5-6.497. all          UCS - Samba domain controller
ii  univention-samb 10.0.1-6.504 all          UCS - UCR Extensions for configurati
ii  univention-samb 5.0.1-52.685 amd64        UCS - Samba4 integration package
ii  univention-samb 5.0.1-52.685 all          UCS - Samba4 sysvol synchronization
ii  univention-saml 3.0.27-5.104 all          Integrates simpleSAMLphp Identity Pr
ii  univention-saml 3.0.27-5.104 all          UCS simpleSAMLphp ldap integration
rc  univention-sasl 4.0.1-1.10.2 all          UCS SASL configuration
un  univention-serv <keine>                   (keine Beschreibung vorhanden)
ii  univention-serv 11.0.1-8.230 all          UCS - master domain controller
un  univention-serv <keine>                   (keine Beschreibung vorhanden)
un  univention-serv <keine>                   (keine Beschreibung vorhanden)
un  univention-sess <keine>                   (keine Beschreibung vorhanden)
un  univention-setu <keine>                   (keine Beschreibung vorhanden)
ii  univention-skel 8.0.1-2.42.2 all          UCS - user default configuration man
ii  univention-snmp 6.0.1-1.20.2 all          UCS - SNMP client configuration
rc  univention-spam 7.0.1-1.77.2 all          UCS - mail antispam
ii  univention-ssh  7.0.0-3.52.2 all          UCS - ssh scripts
ii  univention-ssl  10.0.0-17.17 all          UCS - SSL/TLS certificates
ii  univention-sudo 1.0.0-3.4.20 all          UCS sudo rules
ii  univention-syst 6.0.1-1.56.2 all          UCS - collect system information
ii  univention-syst 9.0.4-48.992 all          UCS System Setup tools
un  univention-syst <keine>                   (keine Beschreibung vorhanden)
rc  univention-syst 8.1.69-22.91 all          Starting univention-system-setup on
root@ucs:/#

Grüße

Christian

Ist bei Ihnen UCS-seitig die NTLM-Authentifizierung deaktiviert? Zeigen Sie doch bitte noch die Ausgabe von:

ucr search --brief '^samba'

Kann das QNAP überhaupt verschlüsselte und signierte SMB Verbindungen?
Der UCS will die auf jeden Fall haben, hab das letztens erst mit FreeNAS durchexerziert.

Diverse Blogposts zu QNAP & AD sagen, dass die QNAP zumindest NTLMv2 nicht kann und man AD-seitig NTLMv1 erlauben muss. Daher u.a. meine Frage nach den UCR-Variablen, weil bei denen auch die korrespondierende Samba-Option gesetzt wird.

Sorry, heute etwas späteR. Das ist ja etwas länger…

samba/acl/allow/execute/always: yes
samba/adminusers: administrator join-backup
samba/auth/methods: <empty>
samba/autostart: no
samba/charset/display: <empty>
samba/charset/dos: <empty>
samba/charset/unix: <empty>
samba/client_use_spnego: <empty>
samba/cups/encrypt: <empty>
samba/deadtime: 15
samba/debug/level: 1
samba/domain/logons: <empty>
samba/domain/master: yes
samba/domain/security: <empty>
samba/domainmaster: <empty>
samba/enable-msdfs: yes
samba/enable-privileges: <empty>
samba/encrypt_passwords: yes
samba/force_printername: <empty>
samba/generate_smbpasswd: false
samba/getwd_cache: yes
samba/guest_account: nobody
samba/homedirletter: I
samba/homedirpath: %U
samba/homedirserver: ucs
samba/interfaces/bindonly: <empty>
samba/interfaces: <empty>
samba/invalid_users: <empty>
samba/kernel_oplocks: yes
samba/large_readwrite: yes
samba/ldap/replication/sleep: <empty>
samba/ldap/server/require/strong/auth: <empty>
samba/logonscript: <empty>
samba/machine_password_timeout: <empty>
samba/map_to_guest: Bad User
samba/max/protocol: <empty>
samba/max_log_size: <empty>
samba/max_open_files: 32808
samba/max_xmit: 65535
samba/memberserver/passdb/ldap: <empty>
samba/netbios/aliases: <empty>
samba/netlogon/sync: <empty>
samba/ntlm/auth: <empty>
samba/oplocks: yes
samba/os/level: <empty>
samba/passdb/expand/explicit: <empty>
samba/preserve_case: yes
samba/profilepath: profile\%U\%a
samba/profileserver: ucs
samba/quota/command: None
samba/read_raw: yes
samba/register/exclude/interfaces: docker0
samba/role: <empty>
samba/server/signing: <empty>
samba/serverstring: <empty>
samba/share/groups: no
samba/share/home: yes
samba/share/netlogon/path: <empty>
samba/share/netlogon: yes
samba/share/sysvol/readonly: <empty>
samba/share/sysvol/update_mtime: <empty>
samba/share/sysvol: <empty>
samba/short_preserve_case: yes
samba/socket_options: <empty>
samba/spoolss/architecture: <empty>
samba/store_dos_attributes: yes
samba/time_server: <empty>
samba/tls/dh/params/file: <empty>
samba/tls/priority: <empty>
samba/tls/verify/peer: <empty>
samba/use_spnego: yes
samba/user/pwdfile: <empty>
samba/user: <empty>
samba/usershare/allow_guests: <empty>
samba/usershare/max_shares: <empty>
samba/usershare/owner_only: <empty>
samba/usershare/path: <empty>
samba/usershare/prefix_allow_list: <empty>
samba/usershare/prefix_deny_list: <empty>
samba/usershare/template_share: <empty>
samba/vfs/acl_xattr/ignore_system_acls: <empty>
samba/wide_links: <empty>
samba/winbind/enum/groups: <empty>
samba/winbind/enum/users: <empty>
samba/winbind/max/clients: <empty>
samba/winbind/nested/groups: <empty>
samba/winbind/rpc/only: <empty>
samba/winbind/trusted/domains/only: <empty>
samba/write_raw: yes
samba4/autostart: yes
samba4/backup/cron/options: <empty>
samba4/backup/cron: 0 3 * * *
samba4/dc: <empty>
samba4/dcerpc/endpoint/drsuapi: <empty>
samba4/disabled: <empty>
samba4/function/level: 2003
samba4/join/dnsupdate: <empty>
samba4/join/site: <empty>
samba4/ldap/base: DC=K***,DC=DE
samba4/ntacl/backend: native
samba4/provision/primary: <empty>
samba4/provision/secondary: <empty>
samba4/role: DC
samba4/schema/update/allowed: <empty>
samba4/service/drepl: <empty>
samba4/service/nmb: nmbd
samba4/service/smb: s3fs
samba4/sysvol/cleanup/cron: 4 4 * * *
samba4/sysvol/cleanup/parameters: <empty>
samba4/sysvol/sync/cron: */5 * * * *
samba4/sysvol/sync/debug: <empty>
samba4/sysvol/sync/from_downstream: <empty>
samba4/sysvol/sync/from_upstream: <empty>
samba4/sysvol/sync/jitter: 60
samba4/sysvol/sync/setfacl/AU: false

Moin,

hmm, nee, die Variablen zeigen auch nichts Ungewöhnliches.

Sie können noch mal versuchen, das Samba-Loglevel auf dem UCS Master radikal hochzusetzen (»ucr set samba/debug/level=10«, gefolgt von »service samba restart«, alternativ für die jetzt gerade laufende Instanz mit »smbcontrol smbd debug 10«), dann den Join-Vorgang erneut versuchen und anschließend die Logdatei »/var/log/samba/log.smbd« auswerten.

Gruß,
mosu

Hallo,

das Logging hat soweit funktioniert. Die einbindung noch nicht- vor allem auch deshalb nicht, weil ich aus dem Wust der Logeinträge keine Ahnung habe, worauf ich zu achten habe.
Dieser Eintrag ist evtl. relevant, oder ist das ein “normaler” Fehler?

[2016/11/05 10:10:57.577301,  0, pid=14548, effective(0, 0), real(0, 0)] ../source4/dsdb/common/util_samr.c:184(dsdb_add_user)
  Failed to create user record CN=qnap,CN=Computers,DC=k***,DC=de: ../ldb_tdb/ldb_index.c:1216: Failed to re-index objectSid in CN=qnap,CN=Computers,DC=k***,DC=de - ../ldb_tdb/ldb_index.c:1148: unique index violation on objectSid in CN=qnap,CN=Computers,DC=k***,DC=de
[2016/11/05 10:10:57.577344,  1, pid=14548, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr.c:439(ndr_print_function_debug)
       samr_CreateUser2: struct samr_CreateUser2
          out: struct samr_CreateUser2
              user_handle              : *
                  user_handle: struct policy_handle
                      handle_type              : 0x00000000 (0)
                      uuid                     : 00000000-0000-0000-0000-000000000000
              access_granted           : *
                  access_granted           : 0x00000000 (0)
              rid                      : *
                  rid                      : 0x00000000 (0)
              result                   : NT_STATUS_USER_EXISTS
[2016/11/05 10:10:57.581219,  1, pid=14548, effective(0, 0), real(0, 0)] ../librpc/ndr/ndr.c:439(ndr_print_function_debug)
       samr_LookupNames: struct samr_LookupNames
          in: struct samr_LookupNames
              domain_handle            : *
                  domain_handle: struct policy_handle
                      handle_type              : 0x00000001 (1)
                      uuid                     : 227dbe51-9f6d-4db3-9047-8c0b346e811a
              num_names                : 0x00000001 (1)
              names: ARRAY(1)
                  names: struct lsa_String
                      length                   : 0x000a (10)
                      size                     : 0x000a (10)
                      string                   : *
                          string                   : 'qnap$'
[2016/11/05 10:10:57.581398, 10, pid=14548, effective(0, 0), real(0, 0), class=ldb] ../lib/ldb-samba/ldb_wrap.c:72(ldb_wrap_debug)
  ldb: ldb_trace_request: SEARCH
   dn: DC=k***,DC=de
   scope: sub
   expr: (sAMAccountName=qnap$)
   attr: sAMAccountType
   attr: objectSid
   control: <NONE>

Moin,

gute Frage. Aber sorgen Sie am Besten noch mal dafür, dass alle existierenden Objekte im LDAP, deren Name »qnap« ist (Computerkonto, DNS-Eintrag…), auch wirklich gelöscht sind, bevor Sie den Join-Vorgang starten. Prüfen Sie das explizit fürs LDAP mit »univention-ldapsearch« und fürs Samba4-LDAP mit »univention-s4search«. Stellen Sie weiterhin sicher, dass das keine Rejects zwischen den beiden gibt, siehe »univention-s4connector-list-rejected«.

Gruß,
mosu

Schade,

habe den Eintrag im DNS gelöscht, ändert nichts an der nicht funktionierenden Einbindung.
Auch obige Befehle brachten keine weiteren Ansatzpunkte.

Dann muss ich wohl aufgeben :frowning:

Danke für die IDee/ Tipps…

Nur ne blöde Frage :slight_smile:

Aber die Uhrzeiten von UCS und QNAP sind gleich ?

[quote=“knebb”]Schade,

habe den Eintrag im DNS gelöscht, ändert nichts an der nicht funktionierenden Einbindung.
Auch obige Befehle brachten keine weiteren Ansatzpunkte.
[/quote]

Moin,

kannst du jetzt nochmal die Ausgabe des Log schicken. In dem obigen Logpost war der Fehler ziemlich eindeutig, das hier Objekt CN=qnap “gestört” hat.

Außerdem bitte prüfen, ob das Objekt sowohl im LDAP, wie auch in Samba4 gelöscht ist. Ggf. stören im S4 auch noch “Deleted Objects” (siehe sdb.univention.de/1256). Aber hiermit vorsichtig sein :slight_smile:

Als alternative bietet QNAP ja auch noch die reine Anbindung ans LDAP an (siehe qnap.com/de-de/tutorial/con … wone&cid=1). Also ganz abseits von S4. Vielleicht ist das ja eine Option?

Viele Grüße,
Tobias Birkefeld

Mastodon