2 Commits

Author SHA1 Message Date
f9bb1bbc4a Remove libcrypto direct package.
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
Preparation for sysvol sync.
2023-07-24 09:09:05 +02:00
100b127a29 Move sysvol and netlogon to smb.conf (only user editable should remain in conf.d).
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is failing
Use lowercase REALM for netlogon share path.
2023-01-27 11:28:00 +01:00
5 changed files with 17 additions and 14 deletions

View File

@@ -21,14 +21,16 @@ ENV ADMIN_PASSWORD_SECRET=samba-admin-password \
SERVER_STRING="Samba Domain Controller" \
TZ=UTC \
WINBIND_USE_DEFAULT_DOMAIN=yes \
WORKGROUP=AD
#ARG SAMBA_VERSION=4.16.7-r1
WORKGROUP=AD \
SYSVOL_DISABLE_SYNC=no \
SYSVOL_SSH_PORT=8322 \
SYSVOL_SSH_KEY_SECRET=samba-ssh-key \
SYSVOL_SSH_PUB_SECRET=samba-ssh-pub
COPY *.conf.j2 /root/
COPY entrypoint.sh /usr/local/bin/
RUN apk add --update --no-cache krb5 ldb-tools samba-dc tdb \
bind bind-libs bind-tools libcrypto1.1 libxml2 tzdata && \
bind bind-libs bind-tools libxml2 tzdata && \
chmod 0755 /usr/local/bin/entrypoint.sh
VOLUME /etc/samba /var/lib/samba

View File

@@ -6,6 +6,7 @@ else
NETBIOS_NAME=$(echo $NETBIOS_NAME | tr [a-z] [A-Z])
fi
REALM=$(echo "$REALM" | tr [a-z] [A-Z])
DOMAIN=$(echo "$REALM" | tr [A-Z] [a-z])
if [ ! -f /etc/timezone ] && [ ! -z "$TZ" ]; then
echo 'Set timezone'
@@ -43,16 +44,14 @@ if [ ! -f /var/lib/samba/registry.tdb ]; then
echo 'root = administrator' > /etc/samba/smbusers
fi
mkdir -p -m 700 /etc/samba/conf.d
for file in /etc/samba/smb.conf /etc/samba/conf.d/netlogon.conf \
/etc/samba/conf.d/sysvol.conf; do
for file in /etc/samba/smb.conf; do
sed -e "s:{{ ALLOW_DNS_UPDATES }}:$ALLOW_DNS_UPDATES:" \
-e "s:{{ BIND_INTERFACES_ONLY }}:$BIND_INTERFACES_ONLY:" \
-e "s:{{ DOMAIN_LOGONS }}:$DOMAIN_LOGONS:" \
-e "s:{{ DOMAIN_MASTER }}:$DOMAIN_MASTER:" \
-e "s+{{ INTERFACES }}+$INTERFACES+" \
-e "s:{{ LOG_LEVEL }}:$LOG_LEVEL:" \
-e "s:{{ NETBIOS_NAME }}:$NETBIOS_NAME:" \
-e "s:{{ REALM }}:$REALM:" \
-e "s:{{ DOMAIN }}:$DOMAIN:" \
-e "s:{{ SERVER_STRING }}:$SERVER_STRING:" \
-e "s:{{ WINBIND_USE_DEFAULT_DOMAIN }}:$WINBIND_USE_DEFAULT_DOMAIN:" \
-e "s:{{ WORKGROUP }}:$WORKGROUP:" \

View File

@@ -1,3 +0,0 @@
[netlogon]
path = /var/lib/samba/sysvol/{{ REALM }}/scripts
read only = No

View File

@@ -18,4 +18,12 @@
acl_xattr:ignore system acls = yes
acl_xattr:default acl style = windows
[sysvol]
path = /var/lib/samba/sysvol
read only = No
[netlogon]
path = /var/lib/samba/sysvol/{{ DOMAIN }}/scripts
read only = No
# Empty new-line must follow

View File

@@ -1,3 +0,0 @@
[sysvol]
path = /var/lib/samba/sysvol
read only = No