Steps For Configuring AuthNull PAM Authenticator (Password Login) for Passwordless Authentication

  1. Login into any VM , check out the pam.so file and did.sh script from the github link given below:

    Github Link

For Password authentication,

Centos Based :

  1. Please add the below lines at the end of the file in /etc/pam.d/su

     auth required /usr/local/lib/security/pam_authenticator.so debug nullok
     auth required pam_permit.so
    

Comment below

#auth           sufficient      pam_rootok.so

#auth           sufficient      pam_wheel.so trust use_uid

#auth           required        pam_wheel.so use_uid
#auth           substack        system-auth
#auth           include         postlogin

#account         required        pam_unix.so

#session                include         system-auth
#session                include         postlogin

b. Ubuntu Based

Please add the below lines at the end of the file in /etc/pam.d/common-auth

auth required /usr/local/lib/security/pam_authenticator.so debug nullok
auth required pam_permit.so

Comment below

  1. Please try su to any local user

     su username
    

This will intiate the passwordless login

Please check the logs from /var/log/auth.log file (for ubuntu based) , and /var/log/secure (centos based)