add timemachine user

This commit is contained in:
copyrights 2024-12-21 10:46:59 +01:00
parent 8623a9f677
commit ffef23e357
2 changed files with 9 additions and 0 deletions

View file

@ -4,6 +4,10 @@ ENV USERNAME samba
ENV PASSWORD password
ENV UID 1000
ENV GID 1000
ENV TM_USERNAME timemachine
ENV TM_PASSWORD timemachine
ENV TM_UID 1001
ENV TMGID 1001
RUN apk add --no-cache samba-server samba-common-tools openssl

View file

@ -3,3 +3,8 @@
addgroup -g $GID samba > /dev/null 2&>1
adduser -S -G samba -u $UID -H -D $USERNAME
echo "$PASSWORD" | tee - | smbpasswd -s -c /etc/samba/smb.conf -a $USERNAME
# Add timemachine user
addgroup -g $TM_GID $TM_USERNAME > /dev/null 2&>1
adduser -S -G $TM_USERNAME -u $TM_UID -H -D $TM_USERNAME
echo "$TM_PASSWORD" | tee - | smbpasswd -s -c /etc/samba/smb.conf -a $TM_USERNAME