How to do Authentication by PAM in PHP code
1. Check which user Apache server is running. In our eg. it is running by www-data 2. Change group ownership of /etc/shadow chgrp www-data /etc/shadow 3. Install php5-auth-pam 3. Create login.html under webserver’s DocumentRoot and put below code under <html> tag <form name="input" action="login.php" method="post"> Username: <input type="text" name="uname" /><br />…