-
-
Save Realetive/d4f451e20cd47a1c68fac56b8be67f68 to your computer and use it in GitHub Desktop.
Generate TOTP QRcode for Google Authenticator for 2FA on linux debian wheezy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
USERNAME=$1 | |
HOSTNAME=$(hostname --fqdn) | |
qrencode -t ANSI256 -o - $(echo otpauth://totp/$USERNAME@$HOSTNAME?secret=$(oathtool --totp -v $(grep $USERNAME /etc/users.oath | cut -f 4) | grep Base32 | cut -d " " -f 3)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment