PAM configuration file of net-www/mod_auth_pam (/etc/pam.d/apache2) has lines separated with '\r\n' instead of '\n'. As a result, PAM subsystem cannot handle it correctly, giving errors like: apache2: PAM _pam_load_conf_file: unable to open /etc/pam.d/system-auth apache2: PAM unable to dlopen(<*unknown module path*>) PAM [dlerror: <*unknown module path*>: cannot open shared object file: No such file or directory] apache2: PAM unable to dlopen(/lib/security/pam_nologin.so ) while both /etc/pam.d/system-auth and /lib/security/pam_nologin.so are present. Tested with Linux x86 with sys-libs/pam-0.78-r5
Fixed.