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
[Help] OTP code incorrect: need revert to single authentification [SOLVED]
Re: [Help] OTP code incorrect: need revert to single authentification
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)
Technical team: support(at)terra-master.com(for technical support)
Service team: service(at)terra-master.com(for purchasing, return, replacement, RMA service)
Re: [Help] OTP code incorrect: need revert to single authentification
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
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
Re: [Help] OTP code incorrect: need revert to single authentification [SOLVED]
Hello! You can try to remove the OTP authentication using the following command: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
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
Re: [Help] OTP code incorrect: need revert to single authentification
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
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

