Copyright (C) 2008-2021 Oliver Bohlen.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU Free Documentation License".
This documentation comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
Generate new seed (Each user should have an unique one):
head -10 /dev/urandom | sha512sum | cut -b 1-30
oathtool -v -d6 GENERATED-SEED
qrencode -o qrcode.png 'otpauth://totp/user@machine?secret=BASE32-SECRET'
If you want to use this solution you need the following howto(s) finished:
emerge media-gfx/qrencode emerge sys-auth/oath-toolkit
File permissions:
Owner: root
Group: root
Permissions: -rw-------
Click here for a download of the complete file: /etc/otp.users
Changed on 19.09.2019File with Users and seed. Seed can be generated with "head -10 /dev/urandom | sha512sum | cut -b 1-30"
# Option User Prefix Seed HOTP/T30/6 username - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX HOTP/T30/6 username - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/pam.d/horde
Changed on 19.09.2019PAM-Config for pam_oath.so
#auth requisite pam_oath.so usersfile=/etc/otp.users window=30 digits=6
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/pam.d/sshd
Changed on 19.09.2019PAM-Config for pam_oath.so
auth sufficient pam_oath.so usersfile=/etc/otp.users window=30 digits=6
File permissions:
Owner: root
Group: root
Permissions: -rw-r--r--
Click here for a download of the complete file: /etc/pam.d/su
Changed on 19.09.2019PAM-Config for pam_oath.so
auth requisite pam_oath.so usersfile=/etc/otp.users window=30 digits=6
File permissions:
Owner: root
Group: root
Permissions: -rw-------
Click here for a download of the complete file: /etc/ssh/sshd_config
Changed on 19.09.2019SSH needs
ChallengeResponseAuthentication yes UsePAM yes
Please send a feedback to: doc<at>gabosh.net
Howto listingHere you can find the official Gentoo Linux Forums where you can find a lot of answers.
Here a link to the official Gentoo Linux Homepage.