Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Login to RHEL 9 laptop with MFA (google authenticator) not working

    Posted on

    Hello all,

    I would like our users to login to their RHEL 9 laptops using MFA. I'm trying to implement MFA using Google Authenticator. I've tried to find information on how to do this. Everything I've read shows how to implement this for SSH. I've failed trying to do this. I've installed google authenticator. These are the steps I've done to try to implement this with no success.

    sudo google-authenticator

    sudo nano /etc/pam.d/login
    Add the Google Authenticator line after the auth lines that handle password authentication:
    auth substack password-auth
    auth required pam_google_authenticator.so

    sudo nano /etc/pam.d/gdm-password
    Instead of adding the Google Authenticator line at the top, try adding it after the auth lines that handle password authentication. For example:

    auth       substack     password-auth
    auth       required     pam_google_authenticator.so
    

    When I reboot, I enter my ID, password and it prompts me for the code from Google Authenticator. I enter this information and it keeps coming up with password invalid error. YES, I am entering the correct password. Any other steps I need to do? Thanks

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2025 Red Hat, Inc.