Skip to content

Commit

Permalink
Init ldap context.
Browse files Browse the repository at this point in the history
  • Loading branch information
kiarn committed Jan 27, 2025
1 parent 134aaca commit 945dc0b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# Load samba domain
smbconf = ConfigParser(delimiters=("=",))
SAMBA_DOMAIN, SAMBA_REALM, SAMBA_NETBIOS, SAMBA_WORKGROUP = [''] * 4
SAMBA_TLD, LDAP_CONTEXT = [''] * 2

def parse_log_level(level):
"""
Expand Down Expand Up @@ -44,4 +45,4 @@ def parse_log_level(level):
SAMBA_TLD = SAMBA_REALM.split('.')[-1].upper()
LDAP_CONTEXT = f"OU=SCHOOLS,DC={SAMBA_WORKGROUP},DC={SAMBA_TLD}"
except Exception as e:
logger.error(f"Can not read realm and domain from smb.conf: {str(e)}")
logger.error(f"Can not read realm and domain from smb.conf: {str(e)}. Is linuxmuster.net installed and configured ?")

0 comments on commit 945dc0b

Please sign in to comment.