안녕하세요...
한가지 팁을 알려 드립니다. 현재 버전의 Xpenology 부팅 이미지 말고 다른 버전의 부팅 이미지로 부팅하게 되면 마이그레이션으로 Synology Assistant 웹이 가동 되게 됩니다. 그때 콘솔 터미널에서 로그인
가능합니다(Trantor 님 이미지를 사용하시면 콘손 터미널 활성됩니다.)
root 패스워드 확인법은 아래와 같습니다. 패스워드 생성기를 컴파일 해서 쓰셔도 되고 아래 설명을 보고 계산 하셔도 됩니다.
간략히 설명 드리면 root 패스워드가 오늘 날짜기준으로 생성됩니다. 11월 21일 패스워드는 b11-17151 됩니다.
해당 패스워드로 로그인 하신후 "mount -o rw md0 마운트할 위치" 로 디스크를 마운트 하신후 /etc/password 의 로트 패스워드를 변경 하시거나 마운트위치/etc.defaults/VERSION 파일 안에 버전을
하위 버전으로 변경하고 마이그래이션하시거나 아니면 휴지통에서 파일을 찾아내시고 ftp로 쏴버리셔도 되겠습니다. 이상입니다.
#include
#include
#include
void main()
{
struct timeval tvTime;
struct tm tmOutput;
gettimeofday(&tvTime, 0);
localtime_r(&(tvTime.tv_sec), &tmOutput);
tmOutput.tm_mon += 1;
printf("password for today is: %x%02d-%02x%02d\n\n",
tmOutput.tm_mon, tmOutput.tm_mon, tmOutput.tm_mday,
gcd(tmOutput.tm_mon, tmOutput.tm_mday));
}
int gcd(int a, int b)
{
return (b?gcd(b,a%b):a);
}
Fire your gcc and compile the code above, and you’ll get the password for today. Or use one of the several online C compilers. Here’s the code using the excellent Codepad.
Bonus tip: if you’re curious how exactly the password is generated, or want to be able to simply infer it quickly without running any code, here’s the formula:
●1st character = 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: 01, 02,.., 31 EDIT: 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.