1. intro

If you ever had to recover a Synology nas box in recovery-mode, pre DiskStation installation or after a failed DiskStation installation.

Then you would need the “secret” telnet password for admin (or in some cases root)

2. recover password

In some cases the clock is also set to factory default then try the password: 101-0101

vi passwd.py
from datetime import date
import fractions

today = date.today()
m = today.month
d = today.day

print("%x%02d-%02x%02d" % (m, m, d, fractions.gcd(d, m)))
python passwd.py

c12-0b01

3. password algorithm

1st = month in hexadecimal, lower case (1=Jan, … , a=Oct, b=Nov, c=Dec)
2-3 = month in decimal, zero padded and starting in 1 (01, 02, 03, …, 11, 12)
4   = dash
5-6 = day of the month in hex (01, 02 .., 0A, .., 1F)
7-8 = greatest common divisor between month and day, zero padded. This is always a number between 01 and 12.

4. reference