Search code examples
linuxapacheubuntubasic-authenticationsuexec

Basic auth + suexec to authenticate as linux user


Is it possible to configure Apache 2.4 with mpm-prefork to let users authenticate as a Linux user (using e.g. basic auth), and then setuid the process to this user before executing the request?

It seems like mod_suexec allows for switching users, but from what I understand these users are hardcoded in the apache2 config. I can't find an example where suexec is used to setuid to a particular authenticated linux user.


Solution

  • You can use mod_auth_external to authenticate apache users against the system password database.

    https://code.google.com/p/mod-auth-external/