Change the ID of an user on Synology

I tried to change the user ID of a Synology user, during my nightmare of streamlining user ids for NFS shares. usermod resulted in a command not found, what a surprise. Anyways to change an ID: edit /etc/passwd and swap the ID edit /etc/group in case you want to change a group ID synouser --rebuild all to synchronize the changes to the system.

November 1, 2022 · Gabe

DSM Config backup via script

Synology doesn’t allow you to backup the DSM config in an automated way, besides via the Synology Account. This gets saved god knows who and is just “automated”, without any possibility to set a schedule. I don’t like this limited out of the box option, so here is a script i added to my CMS to push out to my Synos. Tested on DSM6 and DSM7 devices. In my case it uses a NFS Share, but should be easily adaptable to a CIFS share for example....

November 1, 2022 · Gabe

Installing the Tun Serivce for Synology and VPN

DSM 7 Grab the tunnel service sudo curl -sL https://raw.githubusercontent.com/TRaSH-Guides/Synology-Templates/main/script/tun.service -o "/etc/systemd/system/tun.service" Enable the service sudo systemctl enable /etc/systemd/system/tun.service Run the service sudo systemctl start tun Check if running with sudo systemctl status tun Will look something like this: tun.service - Run tun at startup Loaded: loaded (/etc/systemd/system/tun.service; enabled; vendor preset: disabled) Active: inactive (dead) since Sat 2023-06-24 15:06:27 CEST; 1 months 2 days ago Main PID: 10931 (code=exited, status=0/SUCCESS) Attention: As the service does a simple task it will execute and quit, it won’t stay active....

June 23, 2023 · Gabe

Iptables fix for Docker on Synology

Using a Reverseproxy, or something like pihole, you might have run into the issue of not seeing the correct IPs in the log files. This is annoying if you want to use something like fail2ban for example. Add the script to the task scheduler, or save it as script that you execute via task scheduler on your Syno. To remove it, just remove the script and reboot your Syno. #!/bin/bash currentAttempt=0 totalAttempts=10 delay=15 while [ $currentAttempt -lt $totalAttempts ] do currentAttempt=$(( $currentAttempt + 1 )) echo "Attempt $currentAttempt of $totalAttempts....

June 23, 2023 · Gabe

Use NVME SSD as storage volume instead of cache

Create Partition Login as root with SSH and type : ls /dev/nvme* You will see the /dev/nvme0n1 or /dev/nvme1n1 depend on which slot you install the SSD. type: fdisk -l /dev/nvme0n1 You wil see the disk information. ( if your SSD is at slot 2, use /dev/nvme1n1 instead) Disk /dev/nvme0n1: 238.5 GiB, 256060514304 bytes, 500118192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Now, create partition, type:...

June 23, 2023 · Gabe