Reset Google Authenticator for Synology Diskstation

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 -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.

Synology Diskstation Google Authentication reset

But instead of asking me for the verification code in step two, I got  the screen to reconfigure Google Authenticator as shown below.

Synology Diskstation Google Authentication reset step1 Synology Diskstation Google Authentication reset step2

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.

Diskstation Google Authentication reset step 3

And last but not least I had to enter an email address for prospective resets 😀 to complete the whole process.

Diskstation Google Authentication reset step 4


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:

Further information

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

17 thoughts on “Reset Google Authenticator for Synology Diskstation

  1. Hi,
    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!

  2. Hi,

    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….

    1. Hi,
      You should be able to connect via ssh anyway, hence it is a Unix system in the background.

      You can try:

      ssh -vvv root@ #YOUR IP

        1. Hello Michael,
          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.

  3. 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.

  4. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.