[Help] OTP code incorrect: need revert to single authentification  [SOLVED]

Topics related to system security only
Post Reply
User avatar
ind57
Posts: 10
Joined: 03 May 2025, 00:06
France

[Help] OTP code incorrect: need revert to single authentification

Post by ind57 »

Hi all,
I just set the double authentification in my NAS (version 6.0.673-00165).
I can no more log to TOS via web:
- the "send mail" for password forgotten does not work to retrieve a verification code
- the link "mobile phone has been lost" does not work

The only access to my nas is via SSH.
Do you have any ssh commands available in order to disable the 2FA authentification please?

Thanks in advance for your help,
Stéphane
User avatar
TMnight
TM Support
Posts: 181
Joined: 30 Sep 2022, 16:40

Re: [Help] OTP code incorrect: need revert to single authentification

Post by TMnight »

ind57 wrote: 03 May 2025, 00:14
The operation of deleting OTP verification through SSH commands is relatively complex, as it requires entering the database for corresponding operations. Here are two solutions:
1. You can make an appointment with an engineer through the official website's online customer service to remotely assist in deleting OTP verification.
2. Reinstall the TOS system by following the steps in the following link: viewtopic.php?t=423
To contact our team, please send email to following addresses, remember to replace (at) with @:
Technical team: support(at)terra-master.com(for technical support)
Service team: service(at)terra-master.com(for purchasing, return, replacement, RMA service)
User avatar
ind57
Posts: 10
Joined: 03 May 2025, 00:06
France

Re: [Help] OTP code incorrect: need revert to single authentification

Post by ind57 »

Hi TMNight,
Thanks for your answer,
I can code ssh commands and SQL commands.
Could you provide me the steps to enter the database please? I did not find the good one.
I think the topic you provide me is not relevant as it suppose to insert Hard drive when the NAS is up and running: I have a F8 Plus with only SSD and I really would not like to lose all my data.
Regards,
Stéphane
User avatar
TMLila
TM Product Manager
Posts: 90
Joined: 30 Apr 2024, 16:27
China

Re: [Help] OTP code incorrect: need revert to single authentification  [SOLVED]

Post by TMLila »

ind57 wrote: 03 May 2025, 21:57 Hi TMNight,
Thanks for your answer,
I can code ssh commands and SQL commands.
Could you provide me the steps to enter the database please? I did not find the good one.
I think the topic you provide me is not relevant as it suppose to insert Hard drive when the NAS is up and running: I have a F8 Plus with only SSD and I really would not like to lose all my data.
Regards,
Stéphane
Hello! You can try to remove the OTP authentication using the following command:
psql -h 127.0.0.1 -p 5032 -U terramaster tos
select * from user_tables;
otp_secret
If the removal fails, it is recommended that you reinstall the TOS system. https://forum.terra- master.com/en/viewtopic.php?t=8035
User avatar
ind57
Posts: 10
Joined: 03 May 2025, 00:06
France

Re: [Help] OTP code incorrect: need revert to single authentification

Post by ind57 »

Hi TMLila,
Thanks a lot!!!!
It worked fine.
Here is the line commands to disable the OTP authentication in ssh ("userNameLogin" is the user name to change):

psql -h 127.0.0.1 -p 5032 -U terramaster tos

tos=# \c tos
You are now connected to database "tos" as user "terramaster".

tos=# update user_table set otp_secret='', bind_mobile='', bind_time='' where username='userNameLogin';
UPDATE 1

restart the nas

Another tips:
I have been able to connect as admin user in my NAS by changing a standard user to admin user in modifying the file "/etc/passwrd"


Thanks again for your help, I would have been very disappointed to erase my full nas with all the data whereas I bought it less than 3 months ago ;)

Regards,
Stéphane
Post Reply

Return to “Security”