GOOGLE-AUTHENTICATOR(1)
πΈ GOOGLE-AUTHENTICATOR(1) πΈ
okay bestie, welcome to google-authenticator(1) β the manual page, but make it a group chat. this is the command that sets up one-time passcodes for whoever's logged in right now, and honestly? it's giving security era. π
β¨ NAME β¨
google-authenticator β initialize one-time passcodes for the current user π
β¨ SYNOPSIS β¨
google-authenticator [options]
and listen, if you don't pass any option on the command line, google-authenticator(1) is gonna be like "hey bestie, let's chat" and ask you interactively about the more important options. it literally interviews you. π«Ά
β¨ DESCRIPTION β¨
so here's the vibe: the google-authenticator(1) command creates a brand new secret key in the current user's home directory. by default, that secret key plus all the settings live in ~/.google_authenticator. that's the home base, periodt. π β¨
if your system supports the libqrencode library, a QRCode gets shown, and you can scan it with the Android Google Authenticator application. iconic. π±π
if your system does not have that library, no worries, google-authenticator(1) outputs a URL instead, and you can follow that URL with a web browser. and alternatively, the alphanumeric secret key also gets outputted, so you can just type it manually into the Android Google Authenticator application. old school but it works. π¦
either way, once the key has been added, you should check the verification value. to do that, the user has to click-and-hold the added entry on their Android system until the context menu shows up. then you check that the displayed key's verification value matches the one that google-authenticator(1) gave you. and pls note: this feature might not be available in all builds of the Android application. don't come for me, I'm just the messenger. π
after all that? every single time the user logs into the system, they'll be prompted for the TOTP code (time based one-time-password) or HOTP (counter-based one-time-password) β depends on the options you gave to google-authenticator(1) β right after they've entered their normal user id and their normal UNIX account password. two steps, no skips. π
β¨ OPTIONS β¨
the main character of this whole section is choosing the authentication token type: either time based or counter-based. pick your fighter. π
-c,--counter-basedβ set up counter-based verification.-t,--time-basedβ set up time-based verification.
and everything else depends on that choice, fr fr. which options you get is downstream of which lane you picked.
π Counter-based specific options π
okay so these settings are only relevant for counter-based one-time-password (HOTP):
-w,--window-size=Wβ set window of concurrently valid codes.
by default, three tokens are valid at any one time. this accounts for generated-but-not-used tokens and failed login attempts. and if you wanna decrease the likelihood of synchronization problems, this window can be increased from its default size of 3. ngl, sometimes you just need more room. π«Ά
the window size must be between 1 and 21.
-W,--minimal-windowβ disable window of concurrently valid codes.
π Time-based specific options π
and these settings are only relevant for time-based one-time-password (TOTP):
-D,--allow-reuse,-d,--disallow-reuseβ (dis)allow multiple uses of the same authentication token.
this restricts the user to one login about every 30 seconds, but it increases the chances to notice or even prevent man-in-the-middle attacks. so yeah, slightly more annoying, way more secure. the tradeoff is real. π₯
-w,--window-size=Wβ set window of concurrently valid codes.
by default, a new token is generated every 30 seconds by the mobile application. and to compensate for possible time-skew between the client and the server, an extra token before and after the current time is allowed. this allows for a time skew of up to 30 seconds between authentication server and client. β°
for example, if you're experiencing problems with poor time synchronization, the window can be increased from its default size of 3 permitted codes (one previous code, the current code, the next code) all the way up to 17 permitted codes (the 8 previous codes, the current code, and the 8 next codes). this will permit for a time skew of up to 4 minutes between client and server. that's a whole lotta leeway. π
the window size must be between 1 and 21.
-W,--minimal-windowβ disable window of concurrently valid codes.-S,--step-size=Sβ set interval between token refreshes toSseconds.
by default, time-based tokens are generated every 30 seconds. a non-standard value can be configured in case a different time-step value must be used. customization, we love to see it. β¨
the time interval must be between 1 and 60 seconds.
π General options π
-s,--secret=FILEβ specify a non-standard file location for the secret key and settings.-f,--forceβ write secret key and settings without first confirming with user. no take-backs, no double-checking, it just sends it. π-l,--label=LABELβ override the default label inotpauth://URL.-i,--issuer=ISSUERβ override the default issuer inotpauth://URL.-Q,--qr-mode=none|ansi|utf8β QRCode output mode.
suppress the QRCode output (none), or output QRCode using either ANSI colors (ansi), or Unicode block elements (utf8).
Unicode block elements makes the QRCode much smaller, which is often easier to scan. unfortunately, many terminal emulators do not display these Unicode characters properly. π tragic, truly.
-r,--rate-limit=N,-R,--rate-time=M,-u,--no-rate-limitβ disable rate-limiting, or limit logins toNper everyMseconds.
if the system isn't hardened against brute-force login attempts, rate-limiting can be enabled for the authentication module: no more than N login attempts every M seconds. protect the house. π‘οΈ
the rate limit must be between 1 and 10 attempts. the rate time must be between 15 and 600 seconds.
-e,--emergency-codes=Nβ generateNemergency codes.
a maximum of 10 emergency codes can be generated. keep 'em somewhere safe, bestie, they're your backup plan. π¨
-q,--quietβ quiet mode.-h,--helpβ print the help message.
β¨ SEE ALSO β¨
the Google Authenticator source code and all documentation may be downloaded from <https://github.com/google/google-authenticator-libpam>. go read it, it's free, it's iconic. ππ
and that's the whole page, bestie! π«Ά this was google-authenticator(1) from the Google two-factor authentication use... project β the footer was kinda shy and got cut off, but you get the vibe. stay secure out there, and remember: no cap, always check your verification value. ππ
β¨
π¦ where this page comes from
- alpine 3.24: google-authenticator-doc 1.11-r0 Β· Apache-2.0
- arch rolling: libpam-google-authenticator 1.11-1 Β· Apache
- debian bookworm: libpam-google-authenticator 20191231-2
- debian trixie: libpam-google-authenticator 20191231-2.1
- epel 10: google-authenticator 1.11-1.el10_1 Β· Apache-2.0
- epel 9: google-authenticator 1.09-5.el9 Β· ASL 2.0
- fedora 43: google-authenticator 1.11-3.fc43 Β· Apache-2.0
- fedora 44: google-authenticator 1.11-4.fc44 Β· Apache-2.0
- opensuse-leap 16.0: google-authenticator-libpam 1.10-bp160.1.12 Β· Apache-2.0
- opensuse-leap 16.0: google-authenticator-libpam 1.10-bp160.1.12 Β· Apache-2.0
- opensuse-leap 16.0: google-authenticator-libpam 1.10-bp160.1.12 Β· Apache-2.0
- opensuse-leap 16.0: google-authenticator-libpam 1.10-bp160.1.12 Β· Apache-2.0
- ubuntu jammy: libpam-google-authenticator 20191231-2
- ubuntu noble: libpam-google-authenticator 20191231-2build1
- ubuntu questing: libpam-google-authenticator 20250213-1.11-0.1
- ubuntu resolute: libpam-google-authenticator 20250213-1.11-0.1build1 Β· Apache-2.0
- ubuntu stonking: libpam-google-authenticator 20250213-1.11-0.1build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms