Why can't I use reauth.sh in synology cotainer manager?
It shows:
su: unknown user user
rm: cannot remove '/tmp/icloudpd/reauth.log': No such file or directory
The reaut.sh script changes to the user specified in your icloudpd.conf file to run the re-authentication. If that is blank, it uses the username "user". This is the same behaviour as the main script.
If it cannot find the user user then it suggests the main script hasn't created the account yet, or there was a problem with the creation process.
So is there any way I can use reauth.sh in synology, is it necessary to create a new user with the name user?
I came across this error in testing and it seemed to be due to changing the username. If you create a container with the username abc and then remove that from the config file, the container will attempt to create a new user named user but it will have the same user id as the previous account and fail to create.
I believe your container is in this state, so when running the re-auth command, it is looking for an account that does not exist. This results in the re-auth command failing to launch and also why it cannot remove the temporary file afterwards; because it was never created in the first place.
Simply removing and recreating the container should fix the issue.