Synology Directory Server also LDAP Backend für kopano4s

Vogi

Benutzer
Mitglied seit
07. Jun 2017
Beiträge
54
Punkte für Reaktionen
5
Punkte
8
Hallo zusammen,

nachdem Tosoboso so nett war, in den neuen Versionen postfix mit LDAP Support standardmäsig in kopano4s bereit zu stellen, wollte ich mal meine Konfiguration teilen:

Ich nutze neben kopano4s noch den Synology Directory Server. Dieser stellt auf Basis von Samba4 ein Active Directory zur Verfügung. Wer seine Benutzer damit verwaltet hat, kann auch hier dann auch die Kopano User entsprechend konfigurieren.

Hier mal die Schritte, die ich gegangen bin, relativ knapp gehalten... also einfach fragen, wenn Interesse besteht:

Installation der Kopano AD Extensions.
Download unter: https://download.kopano.io/community/adextension:/sourcecode/
Hier findet sich das Verzeichnis „samba“. Diese muss auf die Synology kopiert werden.
Zusätzlich benötigt man noch das tool „dos2unix“ welches die Synology standardmäsig nicht bietet – dieses hab ich aus einer anderen Linux Distribution auf die Synology (nach /usr/bin) kopiert.
Dann auf der Synology die Schema Erweiterungen integrieren:
Der Aufruf von kopano_schema_add.sh sollte wie folgt aussehen /wenn im selben Verzeichnis die LDF Files mit abliegen):

Code:
./kopano_schema_add.sh DC=XXXXXXXX,DC=YYYYYYY \
    ./ \
    -v \
    -H /volume1/@appstore/DirectoryServerForWindowsDomain/private/sam.ldb \
    -writechanges
Dann heißt es erstmal geduldig sein, bis das durchgelaufen ist.

Die Verwaltung des Directory Servers funktioniert mit den Windows RSAT Tools.
Um hier auch die Kopano Erweiterung komfortabel befüllen zu können, kann man die Kopano Tools auf dem Windows Rechner installieren
https://download.kopano.io/community/adextension:/
Ab jetzt können User angelegt und die Mail Optionen entsprechend konfiguriert werden.

Damit der Kopano Server aber auch davon was mitbekommt, sind noch ein paar Konfig Files anzupassen. Die Pfade beziehen sich auf den Docker Container:

/etc/kopano/server.cfg:
Code:
user_plugin = ldap

Dan noch Umstellung von default "OpenLDAP" auf "Active Directory" und Server Daten anpassen:
/etc/ldap.cfg:
Code:
#!include /usr/share/kopano/ldap.openldap.cfg
!include /usr/share/kopano/ldap.active-directory.cfg
...
ldap_uri = ldaps://IP_DER_DYNOLOGY:636
ldap_bind_user = CN=ADMIN_ACCOUNT,CN=Users, DC=XXXXXXXX,DC=YYYYYYY
ldap_bind_passwd = PASSWORT_DES_ADMIN_ACCOUNTS
ldap_search_base = DC=XXXXXXXX,DC=YYYYYYY

Der Directory Server lässt standardmäsig nur verschlüsselte Verbindungen zu. Ich hatte Probleme mit dem Lets ENcrypt Zertifikat meiner Synology. Daher hab ich die Zertifikatsprüfung im kopano4s Container für die ldap Verbindung deaktiviert:

/etc/ldap/ldap.conf:
Code:
TLS_REQCERT allow


Weiterhin hab ich noch die LDAP Filter (/usr/share/kopano/ ldap.active-directory.cfg) leicht geändert, da ich keine Systemuser des Directory Servers sehen wollte, sondern nur die User, die auch als aktive Kopano User konfiguriert sind (kopanoAccount=1)
Code:
##############################################################
#  LDAP/ACTIVE DIRECTORY USER PLUGIN SETTINGS
#
# Any of these directives that are required, are only required if the
# userplugin parameter is set to ldap.

# When an object (user/group/company) is changed, this attribute will also change:
# Active directory: uSNChanged
# LDAP: modifyTimestamp
ldap_last_modification_attribute = uSNChanged

##########
# Object settings

# attribute name which is/(should: was) used in ldap_user_search_filter
ldap_object_type_attribute = objectClass
ldap_user_type_attribute_value = user
ldap_group_type_attribute_value = group
ldap_contact_type_attribute_value = contact
ldap_company_type_attribute_value = organizationalUnit
ldap_addresslist_type_attribute_value = kopanoAddresslist
ldap_dynamicgroup_type_attribute_value = kopanoDynamicGroup
ldap_server_type_attribute_value = computer

##########
# There should be no need to edit any values below this line
##########

##########
# User settings

# Extra search for users using this LDAP filter.  See ldap_search(3) or RFC
# 2254 for details on the filter syntax.
#
# Hint: Use the kopanoAccount attribute in the filter to differentiate
# between non-kopano and kopano users.
#
# Note: This filter should include contacts.
#
# Optional, default = empty (match everything)
# For active directory, use:
#   (objectCategory=Person)
# For LDAP with posix users:
#   no need to use the search filter.
ldap_user_search_filter = (&(objectCategory=Person)(kopanoAccount=1))

# unique user id for find the user
# Required
# For active directory, use:
#    objectGUID ** WARNING: This WAS: objectSid ** Updates *WILL* fail! **
# For LDAP with posixAccount, use:
#    uidNumber
ldap_user_unique_attribute = objectGUID

# Type of unique user id
# default: text
# For active directory, use:
#        binary
# For LDAP with posix user, use:
#        text
ldap_user_unique_attribute_type = binary

# Optional, default = cn
# For active directory, use:
#   cn or displayName
# For LDAP with posix user, use:
#   cn
ldap_fullname_attribute = cn

# Optional, default = uid
# Active directory: sAMAccountName
# LDAP: uid
ldap_loginname_attribute = sAMAccountName

# Optional, default = userPassword
# Active directory: unicodePwd
# LDAP: userPassword
ldap_password_attribute = unicodePwd

# If set to bind, users are authenticated by trying to bind to the
# LDAP tree using their username + password.  Otherwise, the
# ldap_password_attribute is requested and checked.
# Optional, default = bind
# Choices: bind, password
# Active directory: bind
# LDAP: bind
ldap_authentication_method = bind

# Optional, default = mail
# Active directory: mail
# LDAP: mail
ldap_emailaddress_attribute = mail

# Optional, default = kopanoAliases
# Active directory: kopanoAliases
# LDAP: kopanoAliases
ldap_emailaliases_attribute = otherMailbox

# Whether the user is an admin.  The field is interpreted as a
# boolean, 0 and false (case insensitive) meaning no, all other values
# yes.
# Optional, default = kopanoAdmin
# Active directory: kopanoAdmin
# LDAP: kopanoAdmin
ldap_isadmin_attribute = kopanoAdmin

# Whether a user is a non-active user. This means that the user will
# not count towards your user count, but the user will also not be
# able to log in
# Optional, default = kopanoSharedStoreOnly
# Active directory: kopanoSharedStoreOnly
# LDAP: kopanoSharedStoreOnly
ldap_nonactive_attribute = kopanoSharedStoreOnly

# A nonactive store, or resource, can be specified to be a user, room or equipment.
# Set it to 'room' or 'equipment' to make such types. If set to empty,
# or wrong word, or 'user' it will be a nonactive user.
# Optional, default = kopanoResourceType
# Active directory: kopanoResourceType
# LDAP: kopanoResourceType
ldap_resource_type_attribute = kopanoResourceType

# Numeric resource capacity
# Optional, default = kopanoResourceCapacity
# Active directory: kopanoResourceCapacity
# LDAP: kopanoResourceCapacity
ldap_resource_capacity_attribute = kopanoResourceCapacity

# Optional
# The attribute which indicates which users are allowed
# to send on behalf of the selected user
ldap_sendas_attribute = kopanoSendAsPrivilege

# Optional, default = text
# Active directory: dn
# LDAP: text
ldap_sendas_attribute_type = dn

# The attribute of the user and group which is listed in
# the ldap_sendas_attribute
# Empty default, using ldap_user_unique_attribute
ldap_sendas_relation_attribute = distinguishedName

# Optional, default = userCertificate
# Active directory: userCertificate
# LDAP: userCertificate;binary
ldap_user_certificate_attribute = userCertificate

# Load extra user properties from the propmap file
!propmap /usr/share/kopano/ldap.propmap.cfg

##########
# Group settings

# Search for groups using this LDAP filter.  See ldap_search(3) for
# details on the filter syntax.
# Hint: Use the kopanoAccount attribute in the filter to differentiate
# between non-kopano and kopano groups.
# Optional, default = empty (match everything)
# For active directory, use:
#   (objectCategory=Group)
# For LDAP with posix groups, use:
#   no need to set the search filter
ldap_group_search_filter = (&(objectCategory=Group)(kopanoAccount=1))

# unique group id for find the group
# Required
# For active directory, use:
#    objectSid
# For LDAP with posix group, use:
#    gidNumber
ldap_group_unique_attribute = objectSid

# Type of unique group id
# default: text
# For active directory, use:
#        binary
# For LDAP with posix group, use:
#        text
ldap_group_unique_attribute_type = binary

# Optional, default = cn
# Active directory: cn
# LDAP: cn
ldap_groupname_attribute = cn

# Optional, default = member
# RFC2256 & Active Directory: member
# RFC2307: memberUid
# memberUid does not support Group-in-Group-Membership!
ldap_groupmembers_attribute = member

# Optional, default = text
# RFC2256 & Active Directory: dn
# RFC2307: text
ldap_groupmembers_attribute_type = dn

# The attribute of the user which is listed in ldap_groupmember_attribute
# RFC2256 & Active Directory: empty, matching DNs
# RFC2307: uid, matching users in ldap_loginname_attribute
ldap_groupmembers_relation_attribute =

# A group can also be used for security, e.g. setting permissions on folders.
# This makes a group a security group. The kopanoSecurityGroup value is boolean.
# Optional, default = kopanoSecurityGroup
# Active directory = groupType
# LDAP: kopanoSecurityGroup
ldap_group_security_attribute = groupType

# In ADS servers, a special bitmask action is required on the groupType field.
# This is actived by setting the ldap_group_security_attribute_type to `''ads`''
# Otherwise, just the presence of the field will make the group security enabled.
# Optional, default = boolean
# Active directory = ads
# LDAP: boolean
ldap_group_security_attribute_type = ads

##########
# Company settings

# Search for companies using this LDAP filter.
# Hint: Use the kopanoAccount attribute in the filter to differentiate
# between non-kopano and kopano companies.
# Optional, default = empty (match everything)
# For active directory, use:
#   (objectCategory=Company)
# For LDAP with posix users, use:
#   no need to set the filter
ldap_company_search_filter =

# unique company id for find the company
# Active directory: objectGUID
# LDAP: ou
ldap_company_unique_attribute = objectGUID

# Optional, default = text
# Active directory: binary
# LDAP: text
ldap_company_unique_attribute_type = binary

# Optional, default = ou
# Active directory: ou
# LDAP: ou
ldap_companyname_attribute = ou

# Optional
# The attribute which indicates which companies are allowed
# to view the members of the selected company
ldap_company_view_attribute = kopanoViewPrivilege

# Optional, default = text
ldap_company_view_attribute_type = dn

# The attribute of the company which is listed in the
# ldap_company_view_attribute
# Empty default, using ldap_company_unique_attribute
ldap_company_view_relation_attribute =

# Optional
# The attribute which indicates which users from different companies
# are administrator over the selected company.
ldap_company_admin_attribute = kopanoAdminPrivilege

# Optional, default = text
# Active directory: dn
# LDAP: text
ldap_company_admin_attribute_type = dn

# The attribute of the company which is listed in the
# ldap_company_admin_attribute
# Empty default, using ldap_user_unique_attribute
ldap_company_admin_relation_attribute =

# The attribute which indicates which user is the system administrator
# for the specified company.
ldap_company_system_admin_attribute = kopanoSystemAdmin

# Optional, default = text
# Active directory: dn
# LDAP: text
ldap_company_system_admin_attribute_type = dn

# The attribute of the company which is listed in the
# ldap_company_system_admin attribute
# Empty default, using ldap_user_unique_attribute
ldap_company_system_admin_relation_attribute =


##########
# Addresslist settings

# Add a filter to the addresslist search
# Hint: Use the kopanoAccount attribute in the filter to differentiate
# between non-kopano and kopano addresslists.
# Optional, default = empty (match everything)
ldap_addresslist_search_filter = (kopanoAccount=1)

# This is the unique attribute of a addresslist which is never going
# to change, unless the addresslist is removed from LDAP. When this
# value changes, Kopano will remove the previous addresslist from the
# database, and create a new addresslist with this unique value
ldap_addresslist_unique_attribute = cn

# This value can be 'text' or 'binary'. For OpenLDAP, only text is used.
ldap_addresslist_unique_attribute_type = text

# This is the name of the attribute on the addresslist object that
# specifies the filter to be applied for this addresslist. All users
# matching this filter AND matching the default
# ldap_user_search_filter will be included in the addresslist
ldap_addresslist_filter_attribute = kopanoFilter

# This is the name of the attribute on the addresslist object that
# specifies the search base to be applied for this addresslist.
ldap_addresslist_search_base_attribute = kopanoBase

# The attribute containing the name of the addresslist
ldap_addresslist_name_attribute = cn


##########
# Dynamicgroup settings

# Add a filter to the dynamicgroup search
# Hint: Use the kopanoAccount attribute in the filter to differentiate
# between non-kopano and kopano dynamic groups.
# Optional, default = empty (match everything)
ldap_dynamicgroup_search_filter =

# This is the unique attribute of a dynamicgroup which is never going
# to change, unless the dynamicgroup is removed from LDAP. When this
# value changes, Kopano will remove the previous dynamicgroup from the
# database, and create a new dynamicgroup with this unique value
ldap_dynamicgroup_unique_attribute = cn

# This value can be 'text' or 'binary'. For OpenLDAP, only text is used.
ldap_dynamicgroup_unique_attribute_type = text

# This is the name of the attribute on the dynamicgroup object that
# specifies the filter to be applied for this dynamicgroup. All users
# matching this filter AND matching the default
# ldap_user_search_filter will be included in the dynamicgroup
ldap_dynamicgroup_filter_attribute = kopanoFilter

# This is the name of the attribute on the dynamicgroup object that
# specifies the search base to be applied for this dynamicgroup.
ldap_dynamicgroup_search_base_attribute = kopanoBase

# The attribute containing the name of the dynamicgroup
ldap_dynamicgroup_name_attribute = cn


##########
# Quota settings

# Optional
# The attribute which indicates which users (besides the user who exceeds his quota)
# should also receive a warning mail when a user exceeds his quota.
ldap_quota_userwarning_recipients_attribute = kopanoQuotaUserWarningRecipients

# Optional, default = text
# Active directory: dn
# LDAP: text
ldap_quota_userwarning_recipients_attribute_type = text

# Optional, default empty
ldap_quota_userwarning_recipients_relation_attribute =

# Optional
# The attribute which indicates which users should receive a warning mail
# when a company exceeds his quota.
ldap_quota_companywarning_recipients_attribute = kopanoQuotaCompanyWarningRecipients

# Optional, default = text
# Active directory: dn
# LDAP: text
ldap_quota_companywarning_recipients_attribute_type = text

# Optional, default empty
ldap_quota_companywarning_recipients_relation_attribute =

# Whether to override the system wide quota settings
ldap_quotaoverride_attribute = kopanoQuotaOverride

ldap_warnquota_attribute = kopanoQuotaWarn
ldap_softquota_attribute = kopanoQuotaSoft
ldap_hardquota_attribute = kopanoQuotaHard

# Whether to override the system wide quota settings for all users within the company
ldap_userdefault_quotaoverride_attribute = kopanoUserDefaultQuotaOverride

ldap_userdefault_warnquota_attribute = kopanoUserDefaultQuotaWarn
ldap_userdefault_softquota_attribute = kopanoUserDefaultQuotaSoft
ldap_userdefault_hardquota_attribute = kopanoUserDefaultQuotaHard

# Mapping from the quota attributes to a number of bytes.  Qmail-LDAP
# schema uses bytes (1), ADS uses kilobytes (1024*1024).
ldap_quota_multiplier = 1048576

##########
# Misc. settings

# Attribute which indicates if the user should be hidden from addressbook
ldap_addressbook_hide_attribute = kopanoHidden

# LDAP object search filter. %s in this filter will be replaced with
# the object being searched.
# Hint: Use the kopanoAccount attribute in the filter to differentiate
# between non-kopano and kopano objects.
# Default: empty
# ADS recommended: (anr=%s)
# OpenLDAP optional: (|(mail=%s*)(uid=%s*)(givenName=*%s*)(sn=*%s*))
ldap_object_search_filter = (anr=%s)

# If a request want more objects than this value, it will download the
# full ldap tree (from the base with the search filter) and discard
# wat was not required. This is faster for large requests.
# Default: 1000
ldap_filter_cutoff_elements = 1000

##########
# Multi-server settings

# Users will be created on this named server
# Optional, default kopanoUserServer
ldap_user_server_attribute = kopanoUserServer

# The public store of the company will be created on this named server
# Optional, default kopanoCompanyServer
ldap_company_server_attribute = kopanoCompanyServer

# Optional
# Active directory: kopanoHostAddress
# LDAP: ipHostNumber
ldap_server_address_attribute = kopanoHostAddress

# Optional, default = kopanoHttpPort
# Active directory: kopanoHttpPort
# LDAP: kopanoHttpPort
ldap_server_http_port_attribute = kopanoHttpPort

# Optional, default = kopanoSslPort
# Active directory: kopanoSslPort
# LDAP: kopanoSslPort
ldap_server_ssl_port_attribute = kopanoSslPort

# Optional, default = kopanoFilePath
# Active directory: kopanoFilePath
#LDAP: kopanoFilePath
ldap_server_file_path_attribute = kopanoFilePath

# Determines if a server contains the public store of a non-hosted
# environment. Only one server is allowed to host the public store.
# Optional, default = kopanoContainsPublic
# Active directory: kopanoContainsPublic
# LDAP: kopanoContainsPublic
ldap_server_contains_public_attribute = kopanoContainsPublic

# The Proxy URL of the node; the node must be available to clients
# using this Proxy URL if the server detects that original connection
# was received via a proxy. See server.cfg(5)'s proxy_header setting
ldap_server_proxy_path_attribute = kopanoProxyURL

# Search for servers using this LDAP filter.  See ldap_search(3) or RFC
# 2254 for details on the filter syntax.
# Optional, default = empty (match everything)
# For active directory, use:
#   (objectCategory=Computer)
# For LDAP with posix users, use:
#   
ldap_server_search_filter = (objectCategory=Computer)

# Unique user id to find the server
# Required
# For active directory, use:
#    CN
# For LDAP with posixAccount, use:
#    cn
ldap_server_unique_attribute = cn

Als letztes kann man auch noch die Mail-Aliase (oder Gruppen usw.) bereits in den Benutzerkonten des Directories konfigurieren.

Um diese parallel zu bestehenden Alias Einträgen zu nutzen, einfach die folgende Konfigzeile anpassen (direkt unter der kopano4s Konfig unter SmtpD möglich):

Code:
virtual_alias_maps = hash:/etc/kopano/postfix/valiases, ldap:/etc/postfix/ldap-aliases.cf

Zusätzlich ist dann noch eine ldap-aliases.cf unter /etc/postfix anzulegen:
Code:
server_host = ldaps://IP_DER_SYNOLOGY
server_port = 636
search_base = CN=Users,DC=XXXXXXXX,DC=YYYYYYY
version = 3
bind = yes
bind_dn = CN=ADMIN_ACCOUNT,CN=Users,DC=XXXXXXXX,DC=YYYYYYY
bind_pw = PASSWORT_DES_ADMIN_ACCOUNTS
scope = sub
query_filter = (&(objectClass=user)(otherMailbox=%s))
result_attribute = mail

Das wars auch schon :)
Nach einem Update gehen lediglich die zwei Dateien /etc/ldap/ldap.conf und /usr/share/kopano/ldap.active-directory.cfg verloren.
Diese kann man automatisiert entsprechend Tosbosos Anleitung beim Update aber gleich wieder austauschen.

Alternativ wärs natürlich auch schön, wenn das so allgemeingültig gesehen wird, dass es gleich so übernommen wird ;-)

Viele Grüße
Vogi
 

FricklerAtHome

Benutzer
Mitglied seit
01. Okt 2017
Beiträge
583
Punkte für Reaktionen
42
Punkte
54
Glück Auf Vogi

tolle Anleitung! Deckt sich mit meinen Erfahrungen. Ich hätte noch einen zusätzlichen Tipp!

Sichere nun auch den "Synology Directory Server" und den dazugehörigen "Synology DNS Server" mittels Hyperback in regelmäßigen Abständen. Ich hatte mal mit den beiden Diensten ein Problem nach einem Update der Syno. In der Zeit lief dann verständlicherweise auch in Kopano nichts. Zum Glück hatte ich noch entsprechende Backups (und in meinem Samba AD passiert eigendlich nichts). Die AD-Extension werden im Backup mitgesichert und so war der Betrieb relativ schnell wieder okay.

Glück Auf aus dem heute verschneiten Ruhrpott
F@H
 

blurrrr

Benutzer
Sehr erfahren
Mitglied seit
23. Jan 2012
Beiträge
6.204
Punkte für Reaktionen
1.103
Punkte
248
Tip? Pflicht! Alles andere wäre hochgradig fahrlässig ?

P.S.: Das war wohl der einzige Tag Schnee dieses Jahr für den Ruhrpott, oder wir kriegen so gegen April nochmal was ab ?
 

Vogi

Benutzer
Mitglied seit
07. Jun 2017
Beiträge
54
Punkte für Reaktionen
5
Punkte
8
Stimmt. Die Datensicherung (inkl. Directory / DNS Server) deckt die Anleitung nicht ab.

Geht zwar etwas am Topic vorbei, aber dazu gleich noch ne Frage als kopano4s Neuling:

Wie sichert ihr Eure Mails/Mailanhänge?
Sichert ihr die ganze MAriaDB und zusätzlich die Mailanhänge?
Oder geht ihr über kopano-backup (evtl. über cron-job?) und sichert die backups nochmal?

Danke Euch VOgi
 

FricklerAtHome

Benutzer
Mitglied seit
01. Okt 2017
Beiträge
583
Punkte für Reaktionen
42
Punkte
54
@Vogi

die einfachste Backup-Variante ist die Nutzung von Tosoboso's Skript "kopano4s-backup.sh"!
Ich persönlich hab das deutlich "detailierter" mit dem original "kopano-backup.sh" gelöst. Ich steuere damit für jeden "User" unterschiedliche Mail Ordner, Contakte etc. ins Backup! Das Skript läuft alle 3 Stunden mittels crontab. Ablageort ist eine NFS Freigabe auf einer anderen Syno. Die MARIA Datenbank liegt bei mir auch auf dem anderen NAS (Lastenverteilung) und wird dort täglich mittels Hyperbackup gesichert. Seit drei Monaten muß ich eine "Überwachungskamera" mitschleifen. Deren Bewegungsmeldungen mit den enthaltenden HD Bildern blähten das Backup ganz schon auf, da es ingrementell (also immer reinschiebend, ohne Löschung) arbeitet. Konnte ich bisher Jahres-Backups machen, ist der Backup-Ordner jetzt schon nach 3 Monaten über 2 GB groß. Dann lege ich immer einen neuen Backup-Ordner an.

Für den Notfall aller Fälle habe ich noch eine "Rückhand-Lösung". Falls ich mal neu installieren muss habe ich ein weiteres Script welchens automatisch nach einer vollständiger neuen Installation alle Benutzer neu anlegt und dann aus der NFS Sicherung einen RESTORE in die Stores der User durchführt. Das war mal super einfach als sich das Datenbank-Schema von Kopano änderte. Den Kunstgriff "Migration" brauche ich somit nicht. Nur mit den beiden Scripten "kopano4s/kopano-backup.sh" ist es im übrigen möglich Elemente wie Entwürfe, Kontakte, Kalender und Notizen zu sichern!

Und weil ich halt frickel gibt es noch eine Sicherung. Mit einem gekauften Mail-Backup-Server werden alle MAIL's zusätzlich und kontinuierlich gesichert. Läuft unter Windows und ist nicht preiswert. Läuft aber ziemlich performant und hat Zugriff auf alle 1,5 Mio Mails in meiner Domäne seit 1995!

Mit diesen Techniken halte ich Kopano ziemlich schlank und schnell. Alle User haben ein Quota von Max. 300MB. Das Softdelete (also die Zeit die Kopano intern verstreichen läßt bevor eine gelöschte MAIL auch physikalisch in Kopano gelöscht wird) steht auf einem Tag statt 30.

Alles Doppelt und Dreifach, hat mir aber schon oft (vor allem in der betreuten Nachbarschaft) geholfen.

immer ein Licht bei der Nacht!
F@H
 

FricklerAtHome

Benutzer
Mitglied seit
01. Okt 2017
Beiträge
583
Punkte für Reaktionen
42
Punkte
54
@Vogi

ich hab mal eine Frage zur LDAP Nutzung. Im heimatlichen Netz setze ich auch auf LDAP / AD mittels Syno Directory Server (und angehängtem DNS Server). Das läuft ohne Frage rund und bietet einige Schmankerl. Als Infrastruktur kommen bei mir weitgehend Apple Produkte zum Einsatz. Selbst das funktioniert. -- Aber wie regelst du folgende Fälle:

Ein bisher im LDAP integriertes Familienmitglied muss das heimatliche Nest (Studium am anderen Ort) mit all seiner Hardware verlassen. Bei Kopano-One und auch bei "rspamd" ist nach meiner aktuellen Erkenntnis LDAP quasi Pflicht. Jedoch ist eine solche LDAP Verbindung von extern nur Mittels zusätzlichem VPN möglich. Als trivialster Anlass sei hier die Änderung des Passwortes genannt. Ohne Klimmzüge, trotz VPN, ist mir dazu kein leichter Weg auf einem Smartphone oder Handy bekannt. Bei bestehendem VPN geht das nur mittels echtem Rechner. --- Diese Szenario gibt es in meiner Wirklichkeit. Tochter zieht aus, Daddy's Infrastruktur wird nicht mehr benötigt. Der Mail-Zugriff mittels Exchange-Alternative Kopano soll aber genau so bestehen bleiben. Was machen wir: Kein LDAP für Kopano sondern weiter Benutzerverwaltung in der Kopano-Datenbank mit einem entsprechenden Passwort-Plugin.

Gibt es da auch andere Wege? Aus der Quick-Install-Anleitung zu Kopano-One finde ich keine Hilfe. Mein Kopano läuft tief versteckt im Heimnetzwerk hinter einem reverse-Proxy. Davor noch Fail2Ban und einges anderes. Wireguard steht als VPN zur Verfügung. Ich habe gegenüber dem Internet lediglich einen PORT offen (ja für alles: VPN, KOPANO mittels Z-PUSH, NEXTCLOUD und E-MAIL-ARCHIV). Alles trägt per Sub-Domänen entsprechende Let's Encrypt Zertifikate. Das auch noch mal versetzt. Die von aussen erreichbare Domäne trägt einen vollkommen andere Namen als meine interen Netzwerk-Domäne oder meine (durch einen Provider gehostete) Kopano-Mail-Domäne. Trotzdem sind es alle registrierte DE-Domänen.

Wie setzt du deine LDAP / AD ein. Wir haben uns mit den oben beschriebenen Scenarien und bei lediglich 4 Benutzern dazu entschieden keine zentrale Benutzer und Rechte Verwaltung auch mit Zugriff von externen Clients aufzubauen.

immer ein Licht bei der Nacht
F@H

nun kurz auch noch an @Tosoboso ---- Bei mir läuft jetzt der Commuity-Core 11.0 produktiv. Seit dem läuft auch DeskApp unter BigSur wieder stabil. Gefühlt deutlich aufgehübscht!
 

Vogi

Benutzer
Mitglied seit
07. Jun 2017
Beiträge
54
Punkte für Reaktionen
5
Punkte
8
Hallo F@H,

ich glaube zu verstehen was Du meinst, hab das Problem aber in der Form nicht.
Wir haben auch zwei Haushalte über VPN verbunden. Da bei uns aber jeder auch nen Windows Rechner nutzt und diese ins Active Directory eingebunden sind, lässt sich das Passwort über die Windows Bordmittel (Also Strg-Alt-Enf -> Kennwort ändern) ändern.
Von unterwegs hatte bisher noch niemand die Notwendigkeit.

Ich behaupte aber mal, dass Du sicher nicht der erste wäre, der ein LDAP/AD Passwort ohne Windows-Rechner ändern will.
Hast Dir das schon mal angeschaut:
https://github.com/dducret/kopano-webapp-passwd
So schlecht liest sich das nicht:
Code:
[ATTENTION NOT TESTED on Kopano] If you are using LDAP plugin then change PLUGIN_PASSWD_LDAP to true and also set proper values for PLUGIN_PASSWD_LDAP_BASEDN and PLUGIN_PASSWD_LDAP_URI configurations
Wenns nicht eilt, kann ichs auch mal bei mir installiieren und schauen, ob es läuft
...
 

blurrrr

Benutzer
Sehr erfahren
Mitglied seit
23. Jan 2012
Beiträge
6.204
Punkte für Reaktionen
1.103
Punkte
248
Na sei doch froh! Wenn die Tochter erstmal das Haus verlassen hat, gibt es immerhin noch ein Druckmittel, um sie mal wieder nach Hause zu kriegen! :censored::ROFLMAO: Aber mal ernsthaft: Ist erstmal die Frage, was alles von aussen erreichbar ist und was alles dran hängt. Bei einem richtigen Exchange z.B. könnte man das AD-Passwort auch ganz einfach via OWA (OutlookWebAccess) ändern. Geht mitunter über andere Dienste ebenso...

Auf der anderen Seite... die Leute mit Technik belästigen? "Muss" Deine Tochter ihr Passwort kennen? Wäre es nicht wesentlich geschmeidiger, wenn "einfach so" alles funktioniert? Vielleicht wäre MDM (Mobile Device Management) auch eine Option, dann könnteste das Passwort einfach ändern und die Änderungen auch einfach remote auf das/die Mobilgerät/e übertragen.

EDIT: Sofern die o.g. "Dienste" teils nur via VPN erreichbar sind, würde auch VPN-on-Demand mitunter auch Abhilfe in der Zugangskomplexität schaffen (oder man packt den Mailserver auch direkt dahinter, wie auch immer). Frage wäre ja wohl auch eher "wie ist es bisher gelaufen"?
 

FricklerAtHome

Benutzer
Mitglied seit
01. Okt 2017
Beiträge
583
Punkte für Reaktionen
42
Punkte
54
Genau das Plugin setze ich ein und es ist auch der Standard bei TOSOBOSO. Ich hatte an den möglichen LDAP Zugriff gar nicht mehr gedacht, bzw. hab es bisher nur als DB-User Plugin in der WebApp eingesetzt.
Da must du dir gar keine Mühe machen! Das ist was für den frickler! Ich werde mal auf meiner Test-Syno Kopnao-ONE mit LDAP Installieren (aktuell als VM) und dann das Ding mal durchtesten.

Danke für die schnelle Antwort. Wir haben gar keinen echten Windows Client im Netzwerk! Lediglich ich habe WIN10 in (ja zugegeben in etlichen VM's) am laufen

Ich melde mich wieder hier!
immer ein Licht bei der Nacht!
F@H
 

FricklerAtHome

Benutzer
Mitglied seit
01. Okt 2017
Beiträge
583
Punkte für Reaktionen
42
Punkte
54
@blurrrr
Wir haben kein Windows! Oder nur ich! Und auf den Apple-Kisten geht kein OWS!
MDM setzten wir für die Tablets und Smartphones ein, es gibt aber auch MacBooks etc. Geschmeidiger ist "es funktioniert einfach alles" schon.
Bedeutet aber auch das ich ein weiteres Mitglied in der betreuten Nachbarschaft habe. Ich muss mir dann auch so Dinge wie "informelle Selbstbestimmung" anhören. Wenn man ehrlich ist, nicht zu unrecht.
Faktisch werde ich jetzt gegenüber meiner Tochter zum Provider. Sie möchte diesen DAD-Provider auch nicht wechseln. Deine beiden Emo's passen.

Deine Antwort kann im Forum an während ich noch an meiner letzten Antwort schrieb.

ich halte euch auf dem Laufenden.
immer ein Licht bei der Nacht!
F@H
 

blurrrr

Benutzer
Sehr erfahren
Mitglied seit
23. Jan 2012
Beiträge
6.204
Punkte für Reaktionen
1.103
Punkte
248
Es ging ja auch nicht darum, dass man Windows einsetzt, sondern die Möglichkeit, seine LDAP/AD-Credentials über etwagige - angebundene - Dienste zu ändern, nichts weiter (somit war der Bezug in die M$-Welt auch nur ein Beispiel). Zudem wird es auch noch div. grafische Managementoberflächen geben, wo man sich evtl. auch einfach als User anmelden kann und dort eben sein Passwort ändert. :)
 

FricklerAtHome

Benutzer
Mitglied seit
01. Okt 2017
Beiträge
583
Punkte für Reaktionen
42
Punkte
54
Ich bin gar nicht böse, deine Antwort hat genau die richtige Leichtigkeit. Ich wollt nur Fragen ob damit hier schon jemand Erfahrungen hat.

Wie gesagt ich melde hier meine Erfahrungen. Wenn letztlich nur noch meine Frau und ich im Heimnetz sind wird es nach SAURON.LOCAL ( in lokalen Netzen sollte auch SAURON.MORDOR gehen wenn das ganze ZERO-KONFIG nicht greift) umbenannt und "Ring" ist das einzige Passwort! :ROFLMAO::ROFLMAO::ROFLMAO:


Ps.: Ich kenne ein kleines Netzwerk, da heissen auch heute noch die Benutzerpasswörter: SONNE MOND STERNE und ALLE! So einfach kann das Leben sein! Und sie werden mit Absicht niemals geändert! ???

Beste Grüße bei der Nacht (und auch ein Licht)
F@H
 
Zuletzt bearbeitet:
  • Haha
Reaktionen: blurrrr

FricklerAtHome

Benutzer
Mitglied seit
01. Okt 2017
Beiträge
583
Punkte für Reaktionen
42
Punkte
54
@Vogi

hab jetzt eine Kopano4S V 1.17 und einen neuen Synology Directory Server aufgesetzt. dos2win installiert und versuche nun die AD-Extention zu installieren. Das Script stürzt aber immer ab:

dos2unix: converting file kopano-ads.ldf.unix to Unix format...
writing kopano-ads.ldf.sed.725
Writing kopano-ads.ldf.sed.725 changes to -H /volume1/@appstore/DirectoryServerForWindowsDomain/private/sam.ldb ...
ERR: (No such object) "objectclass: Cannot add CN=Kopano-Quota-Override,CN=Schema,CN=Configuration,DC=POMMES_BUDE, parent does not exist!" on DN CN=Kopano-Quota-Override,CN=Schema,CN=Configuration,DC=POMMES_BUDE at block before line 21
Modify failed after processing 0 records
Error: ldbmodify reported an error

Gibt es noch einen Trick?

F@H
 

blurrrr

Benutzer
Sehr erfahren
Mitglied seit
23. Jan 2012
Beiträge
6.204
Punkte für Reaktionen
1.103
Punkte
248
DC=POMMES_BUDE, parent does not exist!
Ich mach mich irren, aber fehlt da nicht der 2. Domänenteil? Sowas wie DC=pommes,DC=bude, oder DC=pommesbude,DC=local? Glaub "nur" NetBIOS-Name angeben funktioniert bei solchen Sachen eher weniger gut. Heisst jetzt aber nicht, dass es dann funktioniert, sondern ist lediglich ein "ich mein ja nur..." (die Fehlermeldung geht ja auch schon in die Richtung, dass etwas nicht richtig gefunden werden kann "parent does not exist!")
 

FricklerAtHome

Benutzer
Mitglied seit
01. Okt 2017
Beiträge
583
Punkte für Reaktionen
42
Punkte
54
Danke wird gefrickelt
 

FricklerAtHome

Benutzer
Mitglied seit
01. Okt 2017
Beiträge
583
Punkte für Reaktionen
42
Punkte
54
Es war sogar noch schlimmer die Domäne war mehrfach falsch geschrieben! Nochmal Danke!
 
  • Haha
Reaktionen: blurrrr

blurrrr

Benutzer
Sehr erfahren
Mitglied seit
23. Jan 2012
Beiträge
6.204
Punkte für Reaktionen
1.103
Punkte
248
Na dann war der Hinweis ja garnicht so schlecht, ich verschreib mich auch mal gerne und man guckt ja meist echt alles nach, aber diese "Grundsätzlichkeiten übersieht man dann auch gerne mal... hat mich irgendwann auch mal einen halben Tag gekostet, weil ich mich bei einer IP vertippt hatte (173.16 anstatt 172.16 .....) und ich hab natürlich alles "andere" zig mal auf den Kopf gestellt und nix gefunden, nur die 3 in der Datenbank... die hab ich immer hübsch übersehen :ROFLMAO:

Wünsche noch viel Erfolg! :)
 

FricklerAtHome

Benutzer
Mitglied seit
01. Okt 2017
Beiträge
583
Punkte für Reaktionen
42
Punkte
54
Ja, solcher Scheiß passiert immer wieder, jetzt rennt es. Wenn ich das Konstrukt kopano4s mit LDAP und Passwortwechsel mittels Webapp-Plugin "Passwort" ans laufen bekomme melde ich mich. Das wäre dann auch der Einstieg von rein externen Clients mittels SSO bzw. kopano-konnect. --- Zum Glück hab ich ein Test-System! ---- Aber SAURON.MORDOR hat seinen Reiz nicht verloren. ?
Ansonsten habe ich heute meine pihole / unbound Installation mal mit dem aktuellen Artikel aus der C'T abgeglichen.

Nochmals Danke und immer ein Licht bei der Nacht
F@H PS: Kurz vor 0 Grad im Pott
 
  • Haha
Reaktionen: blurrrr

FricklerAtHome

Benutzer
Mitglied seit
01. Okt 2017
Beiträge
583
Punkte für Reaktionen
42
Punkte
54
@Vogi

Was ist den hier der genaue Pfad?

Dan noch Umstellung von default "OpenLDAP" auf "Active Directory" und Server Daten anpassen:
/etc/ldap.cfg:


Code:

#!include /usr/share/kopano/ldap.openldap.cfg
!include /usr/share/kopano/ldap.active-directory.cfg
...
ldap_uri = ldaps://IP_DER_DYNOLOGY:636
ldap_bind_user = CN=ADMIN_ACCOUNT,CN=Users, DC=XXXXXXXX,DC=YYYYYYY
ldap_bind_passwd = PASSWORT_DES_ADMIN_ACCOUNTS
ldap_search_base = DC=XXXXXXXX,DC=YYYYYYY


die Datei etc/ldap.cfg gint es in meinem Docker Container nicht!
Ansonsten kann ich den Config nachvollziehen!

F@H
 


 

Kaffeautomat

Wenn du das Forum hilfreich findest oder uns unterstützen möchtest, dann gib uns doch einfach einen Kaffee aus.

Als Dankeschön schalten wir deinen Account werbefrei.

:coffee:

Hier gehts zum Kaffeeautomat