Created
January 5, 2015 11:40
-
-
Save martint17r/b44e8db9aae0a931a99a 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)) |
@martint17r: thanks for this
where do I get /etc/users.oath?
It's the pam_oath file, where token seeds are stored
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
where do I get /etc/users.oath?