umbrel
umbrel copied to clipboard
2FA after restart won't work
After restarting, google authenticator doesn't generate valid keys for umbrel 2FA anymore.
How can I disable 2FA via ssh?
Any luck? been having same issue. Was told this would work but i get two errors after. would love some help also
json_file="/home/umbrel/umbrel/db/user.json" && contents="$(jq ‘del(.otpUri)’ ${json_file})" && echo “${contents}” > ${json_file}
Result: -bash: command substitution: line 2: syntax error near unexpected token `(’
-bash: command substitution: line 2: `jq ‘del(.otpUri)’ ${json_file})"
Thanks, doesnt work for me either. Same errors.
I also experience the issue; please let me know if I can help by sharing any specific logs and/or debug information.
Sorry for the issue. Can you please try running this to disable 2FA (there's a slight difference in the comma in this command):
json_file="/home/umbrel/umbrel/db/user.json" && contents="$(jq 'del(.otpUri)' ${json_file})" && echo "${contents}" > ${json_file}
I had the same problem and I solved by manually substituting the alphanumeric string with the null string ("") at the key "otpUri" in the file /home/umbrel/umbre/db/user.json. Now, I would like to reactivate the 2FA but the code displayed in Authy does not work. I don't think it is related to the time. Any ideas? Thank you!
For anyone coming across this issue now, what I found worked for disabling 2FA is
sudo bash -c 'json_file="user.json"; contents="$(jq "del(.otpUri)" ${json_file})"; echo "${contents}" > ${json_file}'
as if you're not already in a shell with sudo privileges, the direct command above gives permission denied and just calling sudo
in front of it doesn't elevate the entire command.
It's a 2 year old thread -- but it's what directly comes up when searching for 2fa related issues on the repo. 2fa still seems broken, afaik, as I've had this issue happen a few times where 2fa codes are always incorrect. Looks to happen when the domain changes (e.g. umbrel.local as opposed to your local IP address as opposed to a Tailscale IP).