Closed listinfm closed 6 months ago
Please post your EXTERNAL_CONF
files without the passwords. Something isn't right.
Here is my file:
TM_USERNAME=alex
TM_GROUPNAME=timemachine
PASSWORD=
SHARE_NAME=alextimemachine
VOLUME_SIZE_LIMIT="300 G"
TM_UID=1009
TM_GID=1000
It isn't showing up in what your copied above but It looks like you have some odd carriage returns/end of lines in your user config file. In your logs, it looks like after every reference to the variables in the config file, it's including some sort of new line character.
Here is the startup of when I created the user config plus me making one up for kimberly.conf
:
# alex.conf
TM_USERNAME=alex
TM_GROUPNAME=timemachine
PASSWORD=foobarbaz
SHARE_NAME=alextimemachine
VOLUME_SIZE_LIMIT="300 G"
TM_UID=1009
TM_GID=1000
# kimberly.conf
TM_USERNAME=kimberly
TM_GROUPNAME=timemachine
PASSWORD=foobarbaz
SHARE_NAME=kimberlytimemachine
VOLUME_SIZE_LIMIT="300 G"
TM_UID=1010
TM_GID=1000
$ docker compose up
[+] Running 1/0
✔ Container timemachine Created 0.0s
Attaching to timemachine
timemachine | INFO: CUSTOM_SMB_CONF=false; generating [global] section of /etc/samba/smb.conf...
timemachine | INFO: Avahi - generating base configuration in /etc/avahi/services/smbd.service...
timemachine | INFO: Loading values from /users/alex.conf
timemachine | INFO: Avahi - adding the 'dk0', 'alextimemachine' share txt-record to /etc/avahi/services/smbd.service...
timemachine | INFO: Group timemachine exists; skipping creation
timemachine | INFO: User alex exists; skipping creation
timemachine | INFO: CUSTOM_SMB_CONF=false; generating [alextimemachine] section of /etc/samba/smb.conf...
timemachine | INFO: Samba - Created User alex password set to none.
timemachine | INFO: Samba - Enabled user alex.
timemachine | INFO: Samba - setting password
timemachine | INFO: SET_PERMISSIONS=false; not setting ownership and permissions for /opt/alex
timemachine | INFO: Loading values from /users/kimberly.conf
timemachine | INFO: Avahi - adding the 'dk1', 'kimberlytimemachine' share txt-record to /etc/avahi/services/smbd.service...
timemachine | INFO: Group timemachine exists; skipping creation
timemachine | INFO: User kimberly doesn't exist; creating...
timemachine | INFO: Setting password from environment variable
timemachine | chpasswd: password for 'kimberly' changed
timemachine | INFO: INFO: CUSTOM_SMB_CONF=false; generating [kimberlytimemachine] section of /etc/samba/smb.conf...
timemachine | INFO: Samba - Created Added user kimberly.
timemachine | INFO: Samba - Enabled user kimberly.
timemachine | INFO: Samba - setting password
timemachine | INFO: SET_PERMISSIONS=false; not setting ownership and permissions for /opt/kimberly
timemachine | INFO: Avahi - completing the configuration in /etc/avahi/services/smbd.service...
timemachine | INFO: dbus PID exists; removing...
timemachine | removed '/run/dbus/dbus.pid'
timemachine | INFO: running test for xattr support on your time machine persistent storage location...
timemachine | INFO: xattr test successful - your persistent data store supports xattrs
timemachine | INFO: Detected filesystem for /opt/alex is fakeowner
timemachine | INFO: Detected filesystem for /opt/kimberly is fakeowner
timemachine | INFO: entrypoint complete; executing 's6-svscan /etc/s6'
timemachine | Found user 'avahi' (UID 86) and group 'avahi' (GID 86).
timemachine | Successfully dropped root privileges.
I am guessing that the conf files that you have created a DOS file formatted text file. This can be verified using the file
command. Here I have the files converted to DOS format:
$ file *
alex.conf: ASCII text, with CRLF line terminators
kimberly.conf: ASCII text, with CRLF line terminators
You can use dos2unix
, which you may need to install, to convert the files to not have the CRLF
line ends.
$ dos2unix *
dos2unix: converting file alex.conf to Unix format...
dos2unix: converting file kimberly.conf to Unix format...
You'll want to see that they're just a plain ASCII text file:
$ file *
alex.conf: ASCII text
kimberly.conf: ASCII text
Or you can do all of this from inside the container:
Exec into the container:
docker exec -it timemachine sh
Install file
and dos2unix
:
apk add file dos2unix
Check and convert the files and re-check them:
cd /users
file *
dos2unix *
file *
Then restart your time machine container.
@mbentley That certainly fixed it - thank you for the quick replies! Amazing support :). I was truly going in circles trying to understand what characters it wasn't liking. I do not think I would have figured this out without your help! Thank you so much, this has resolved the issue. :)
Describe the Bug
I'm trying to setup the timemachine (smb) so that 2 users have their own access/credentials. I have setup the macvlan since avahi was interfering with the host, and below is the docker compose. When I try to log into the Timemachine from my mac, I keep being denied. Looking at the log I believe the individual user I have set up (alex) are not being successfully created, the log show it fails to add the usergroup, user, find the user.
I'm not too sure what I'm doing incorrectly or how I can go about troubleshooting this further. Any help is welcomed!
Expected Behavior
Successful creation of user credentials and ability to log into the timemachine using the credentials
Steps to Reproduce
How You're Launching the Container
Container Logs
Time Machine client Logs
No response
Additional Context
No response