-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Two-Factor Authentication for SOGo #4490
Comments
Hm thats strange. |
For me only the SQL Statement works. |
Sorry, I cant reproduce this on another installation. I do not get any logs if it's successful too btw but I can toggle the 2FA using sogo-tool running as sogo user in the container. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
correct command is: #enter mysql-container
cd /opt/mailcow-dockerized/
docker-compose exec mysql-mailcow /bin/bash
mysql -u $MYSQL_USER -p$MYSQL_PASSWORD
-- select database
USE mailcow;
-- look at current settings
SELECT *
FROM sogo_user_profile
WHERE c_uid = "[email protected]";
-- disable 2FA
UPDATE sogo_user_profile
SET c_defaults = REPLACE(
c_defaults,
"\\"SOGoTOTPEnabled\\": 1",
"\\"SOGoTOTPEnabled\\": 0")
WHERE c_uid = "[email protected]";
-- bye
QUIT;
#leave mysql-container
exit
#restart SOGo
#(also possible in Mailcow UI)
docker-compose restart sogo-mailcow very important is correct place backslash between quotes in UPDATE/SET command |
Same here, when trying the sogo-tool, I get these errors:
Edit: fixed by running as the Sogo user |
Prior to placing the issue, please check following: (fill out each checkbox with an
X
once done)Summary
In the documention it is explained how to reset 2FA for Sogo:
https://mailcow.github.io/mailcow-dockerized-docs/troubleshooting/debug-reset_pw/
but this command did not work.
I searched a little bit and found the following solution:
https://sandstorm.de/de/blog/post/how-to-reset-u2f-for-sogo-user-in-mailcow.html
i changed the SQL Statement to the the new database shema:
This works.Is it possible to create an script for to this?
Definitely the documention should be updated.
Logs
Reproduction
I tried also following command but that did not work:
docker-compose exec -u sogo sogo-mailcow sogo-tool user-preferences set defaults [email protected] SOGoTOTPEnabled '{"SOGoTOTPEnabled":0}'
System information
docker version
)docker-compose version
)git diff origin/master
, any other changes to the code? If so, please post them.iptables -L -vn
,ip6tables -L -vn
,iptables -L -vn -t nat
andip6tables -L -vn -t nat
.docker exec -it $(docker ps -qf name=acme-mailcow) dig +short stackoverflow.com @172.22.1.254
(set the IP accordingly, if you changed the internal mailcow network) and post the output.The text was updated successfully, but these errors were encountered: