Today I had to reset Google Authenticator two step authentication for Synology Diskstation. I realised, that I wasn’t able to login into my Synology DS 212+ anymore.
The problem was, that my mobile phone had crashed before a view months and I had configured the Synology NAS to use the Google Authenticator for a two step authentication process for login. And the reset link didn’t work, because the DS wasn’t able to send emails (no idea why so far).
Solution to reset Google Authenticator two step authentication for Synology Diskstation 212+
Fortunately I had still shell access to the NAS. So I could simply login with a sudoers (administrative user).
Here are the steps I’ve taken:
First I had to log in into the Diskstation via SSH:
$> ssh -i .ssh/mykeys/id_rsa_ds email@example.com -p26
Afterwards I had to find the Google Authenticator preferences file:
$> sudo find /usr -name google_authenticator
What gave me something like that:
As you can see, the preferences file was found under /usr/syno/etc/preference/sheldon/google_authenticator.
Then I just remove the file with the following command:
$> rm /usr/syno/etc/preference/sheldon/google_authenticator
Reconfigure Google Authenticator for Synology Diskstation
Now I was able to go to the webinterface of my Synology Diskstation and log myself in as usual.
But instead of asking me for the verification code in step two, I got the screen to reconfigure Google Authenticator as shown below.
The QR-Code shown afterwards had to be scanned with the Google Authenticator app on my new mobile phone and finally I had to verify the process with a generated code from the app.
And last but not least I had to enter an email address for prospective resets 😀 to complete the whole process.
That’s it! Afterward I was redirected to my Synology Desktop. And now I’am able to login with two step authentication again.
No SSH access for Synology Diskstation
If you didn’t activate the terminal for your Synology Diskstation, you have to soft reset the box and reset only password and network settings as described here:
I found a video that helped me a lot to solve my problem and regain access to my Synology Diskstation DS 212+. It can be found unter https://www.youtube.com/watch?v=ROVuFokUs7o.
17 thoughts on “Reset Google Authenticator for Synology Diskstation”
I did a reset on my phone. So my Google Authenticator didn’t work anymore for my synology. With your page I was able to login without the 2 step thingy. Thanks. Now I can re-enable the 2 step again. Great work! Keep it up!
That is exactly the problem I am having currently, accept I dont have shell installed.
Any idea how to dissable Google 2 way?….
I am lost….
You should be able to connect via ssh anyway, hence it is a Unix system in the background.
You can try:
ssh -vvv firstname.lastname@example.org #YOUR IP
If my device was set ssh and talnet to disabled, how do I disable google auth
I’m afraid that you have to do a soft reset then (see “No SSH access for Synology Diskstation” above), because there is no other way to access your DiskStation in your case. At least no one I known. Anyone else here?
But if you have backuped your settings, that is not that hard. I had to do it in another situation and was surprised, that it was relatively easy to recover everything.
Or you can check Synology Assistent:
It can reset admin password and SSH access.
Kind regards …
Or you need to reset the password and network settings as described here:
Great! Great Great Great!
I was so lost !
Thank you !!!!!
Thanks for your blog post, it worked fine for me.
Thanks. Got locked out of DSM but had shell access, and this was exactly the solution I needed. Going to see if you have a tip jar or something I can throw a few bucks to.
That did the trick ! Didn’t realize the urgency email was meant to be sent by the Synology itself, which obviously required to set up outgoing smtp connection -> that’s my next step now that I can login again thanks to you.
Thanks a lot. This and ssh enabled saved my day 🙂
You’re a genius! Worked like a charm Thank you!!!
Wow. You just saved my life. Thanks so much for the detailed instructions!
Thanks a lot Sheldon.
Night and Weekend are saved.
Thanks. Worked like a charm.
You just made my day!! Thank you so much.