duosecurity / duo_unix

Duo two-factor authentication for Unix systems
http://www.duosecurity.com
349 stars 136 forks source link

Duo UNIX PAM module failing on AIX #269

Open athomasLRS opened 1 year ago

athomasLRS commented 1 year ago

Description

Successfully compiled Duo UNIX source code on AIX using gcc-10 and gcc-11, but pam_duo module errors out when attempting to authenticate. AIX 7.1 & AIX 7.2

Actual Behavior

Errors in syslog

Oct 27 11:47:29 aixlab02 auth|security:info sshd[11927922]: starting Duo Unix: PAM Duo
Oct 27 11:47:29 aixlab02 auth|security:err|error sshd[11927922]:  from %s
Oct 27 11:47:29 aixlab02 auth|security:debug sshd: PAM: pam_authenticate: error Error in underlying service module
Oct 27 11:47:29 aixlab02 auth|security:err|error sshd[18219352]: error: PAM: Error in underlying service module for thomasa from 127.0.0.1
Oct 27 11:47:29 aixlab02 auth|security:info syslog: ssh: failed login attempt for thomasa from 127.0.0.1

I'm not sure how to get more detailed logs from the Duo PAM module

Steps to Reproduce

  1. Per Duo documentation, ran: ./configure --with-pam --prefix=/usr && make && sudo make install to compile source code
  2. Modified appropriate AIX config files to enable PAM & Duo
  3. Attempt to authenticate via ssh, su, or sudo
  4. Errors out. No Duo prompt

Workarounds

Using the IBM XL C for AIX compiler produces a pam_duo module that works. But would like to get it working for environments that are not licensed for XL C for AIX and using the open source gcc compiler.