Synology have advised people for some time now to not use an administrator user called admin, as this account will be subject to password guessing attacks. While all my clients have strong passwords on their admin users, having a different username for the main administrative account is an extra layer of security that it makes sense to employ.
When setting up a new NAS, Synology DSM will not let you chose the username admin, nor will it let you use administrator. This is great for a new NAS, however for existing devices out there, it can be difficult to disable the existing admin user as there are generally a number of tasks tied to this account.
Cloud Sync is one such system where the username is tied directly to the sync tasks, and if you disable the account that set up the respective sync task, then the task is disabled.
If you have a lot of Cloud Sync tasks it can be complicated to re-do them all, particularly if this means you need to resync hundreds of thousands of files with your cloud backup service, like Backblaze B2.
Fortunately there is a way to change the ownership of these tasks – it may not be endorsed by Synology, and it may break your server in unusual and exciting ways, but it worked for me, so here it is from the Synology Community
I’m adding the solution here in case the original disappears at some stage in the future.
The settings are stored in an SQLite database and can be modified there. I took the following steps.
- Stop the cloud sync service from the Package Manager
- Connect to the Synology NAS via ssh
- Navigate to the volume where the configuration for CloudSync resides, and then into the config folder. e.g.
- Look up the user id and group id of our new admin user. Run
id -u new_admin_usernameand
id -g new_admin_username. Lets assume these admin uid is 1033 and gid is 100
- Run an sqlite shell for the config database by typing
sudo sqlite3 config.sqlite
- Check the existing connections by typing
select * from connection_table;(and don’t forget the semicolon at the end like I always do)
- Note down the ids of the configuration lines that need a change. This is the first number in each row.
- Update the uid, gid and username in each affected row via
update connection_table set uid=1033, gid=100, local_user_name="new_admin_username" where id=3;the id at the end of the command will indicate which row you want to update.
- Repeat this for each row you need to update.
- Review the connections by typing
select * from connection_table;(again don’t forget the semicolon at the end)
.quitto exit the sqlite shell.
- Go to the Package Manager and start the Cloud Sync package.