ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Alexei Mezin <alexei.mezin@gmail.com>
To: ALT Linux Sisyphus discussions <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] двухфакторная аутентификация с google authenticator
Date: Fri, 20 Sep 2019 14:41:59 +0300
Message-ID: <fe8f2e19-47d5-af0c-a969-3939dffdffbb@gmail.com> (raw)
In-Reply-To: <6701e6fd-c1d2-6923-4cc5-c1357704602d@gmail.com>

20.09.2019 11:01, Alexei V. Mezin пишет:

> Тогда подскажите, что и как отлаживать. Гугловская часть работает судя 
> по всему:

Так, вот в чем дело (вероятно):
у нас sshd сначала использует

auth           required        pam_userpass.so

который принимает пароль и передает его дальше на

auth           include         common-login-use_first_pass

Именно поэтому используется use_first_pass. И такая схема не 
срабатывает, если надо запросить пароль два раза. Зачем pam_userpass.so 
не очень понятно

pam_userpass is a PAM authentication module for use specifically by
services implementing non-interactive protocols and wishing
to verify a username/password pair.

Наверное это что-то очень нужное для хождения какого-нить git по ключу и 
т.п. Расскажите, что отвалится у "обычного пользователя", если sshd 
будет работать напрямую с

auth            include         system-auth-local

Как минимум удаленный вход на сервер по паролю и sftp не отвалились :)


Кратко резюмируя: вот с таким конфигом как минимум удаленно пускает на 
сервер с применением двухфакторной аутентификации.

# cat /etc/pam.d/sshd
#%PAM-1.0
auth            include         system-auth-local
auth            required        pam_google_authenticator.so 
echo_verification_code nullok
account         include         common-login
password        include         common-login
session         include         common-login



  reply	other threads:[~2019-09-20 11:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-19 14:55 Alexei Mezin
2019-09-20  4:12 ` Anton Farygin
2019-09-20  6:04   ` Alexei V. Mezin
2019-09-20  7:35     ` Denis Medvedev
2019-09-20  7:41       ` Paul Wolneykien
2019-09-20  8:01         ` Alexei V. Mezin
2019-09-20 11:41           ` Alexei Mezin [this message]
2019-09-20 15:36             ` Dmitry V. Levin
2019-09-20 20:03               ` Alexei V. Mezin
2019-09-20 21:53                 ` Dmitry V. Levin
2019-09-21  6:42                   ` Alexei V. Mezin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe8f2e19-47d5-af0c-a969-3939dffdffbb@gmail.com \
    --to=alexei.mezin@gmail.com \
    --cc=sisyphus@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git