cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
356
Views
0
Helpful
1
Replies

DUO 2FA login on Linux 8.10

aziddam1
Level 1
Level 1

Hello,

I was trying to setup 2fa for our Linux server running on Oracle Linux 8.10. everything seemed fine until I discovered that when i entered a wrong password, duo still prompts me for a 2fa code or push notification depending on what i choose. Is this normal?

 

my /etc/ssh/sshd_config

 

HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
SyslogFacility AUTHPRIV
PermitRootLogin yes
AuthorizedKeysFile      .ssh/authorized_keys
PasswordAuthentication yes
AuthenticationMethods password keyboard-interactive
ChallengeResponseAuthentication yes
GSSAPIAuthentication yes
GSSAPICleanupCredentials no
UsePAM yes
X11Forwarding yes
PrintMotd no
UseDNS no
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
Subsystem       sftp    /usr/libexec/openssh/sftp-server

 

 

my /etc/pam.d/sshd

 

#%PAM-1.0
auth       substack     password-auth
auth       sufficient   pam_duo.so
auth       required     pam_deny.so
auth       required     pam_env.so
auth       include      postlogin
account    required     pam_sepermit.so
account    required     pam_nologin.so
account    include      password-auth
password   include      password-auth
# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    required     pam_loginuid.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session    required     pam_selinux.so open env_params
session    required     pam_namespace.so
session    optional     pam_keyinit.so force revoke
session    optional     pam_motd.so
session    include      password-auth
session    include      postlogin

 

 

1 Reply 1

DuoKristina
Cisco Employee
Cisco Employee

Did you try the pam suggestion for RHEL? I am not a pam expert but I think you need to add a requisite module, because a failure on a required module will still continue through the stack while a failure on a requisite module terminates.

Duo, not DUO.
Quick Links