samba.sh fix #82

This commit is contained in:
David Personette 2017-10-24 11:28:26 -04:00
parent 3bcbaea839
commit 6532fb1072
2 changed files with 3 additions and 3 deletions

View File

@ -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"]

View File

@ -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
}