diff --git a/Dockerfile b/Dockerfile index e2f24a6..112e3da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,11 +40,11 @@ RUN apk --no-cache --no-progress upgrade && \ COPY samba.sh /usr/bin/ +EXPOSE 137/udp 138/udp 139 445 + HEALTHCHECK --interval=60s --timeout=15s \ CMD smbclient -L '\\localhost\' -U 'guest%' -m SMB3 -EXPOSE 137/udp 138/udp 139 445 - VOLUME ["/etc/samba"] ENTRYPOINT ["samba.sh"] \ No newline at end of file diff --git a/samba.sh b/samba.sh index 0c18fd7..d23929a 100755 --- a/samba.sh +++ b/samba.sh @@ -52,7 +52,7 @@ global() { local key="${1%%=*}" value="${1#*=}" file=/etc/samba/smb.conf import() { local name id file="$1" while read name id; do adduser -D -H -u "$id" "$name" - done < <(cut -d: -f1,2 --output-delimiter=' ' $file) + done < <(cut -d: -f1,2 $file | sed 's/:/ /') pdbedit -i smbpasswd:$file }