Skip to main content

CWP: Getting error "pam_unix(webmin:auth): authentication failure" on Latest Webmin 1.9 on CentOS 7.6 [Fixed]

The Webmin is running smoothly but getting error when I'm checking the webmin status using systemctl command. The New Issue is
# systemctl status  webmin -l 
pam_unix(webmin:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=  user=root
 
I'm looking for solution on web but didn't get the proper solution. Someone said that delete the "webmin" file from /etc/pam.d/ and Somebody said that Try editing /etc/webmin/miniserv.conf and removing the line ipv6=1 or just renew the self-sign certificate But I already have Let's Encrypt certificate with validity.  

Just Follow this Steps:
Goto Webmin >> Webmin Configuration >> Authentication >> Use "Never use PAM for Unix authentication "  OR
# vi /etc/webmin/miniserv.conf
  no_pam=0 
:x (save & close)
Now Restart the Webmin and check the log , There is no warning .
# systemctl restart webmin 

# tail -f /var/webmin/miniserv.error
# tail -f /var/log/secure | grep webmin
But This is not a best practice/solutions. 
Best Practice: Follow the the guide: https://doxfer.webmin.com/Webmin/PAM_Authentication

Few Commands For Troubleshooting 
# ps -ef | grep webmin
# grep -i pam /etc/webmin/miniserv.conf
# cat /etc/pam.d/webmin

# curl -v webmin_url:webmin_port
# curl https://127.0.0.1:webmin_port

# curl https://127.0.0.1:webmin_port
# telnet 127.0.0.1 wenmin_port 

# lsof -i tcp:webmin_port
# tail -f /var/webmin/miniserv.error 
# tail -f /var/log/secure | grep webmin
 

Reference Link:
Link 1
Link 2
Link 3
Link 4
Link 5

Comments