auth via pam
i miss to auth via pam.
it's very usefull, because one authentification system for all daemons.
i use pam for all services.
Updated by Anonymous about 11 years ago
I would like to see PAM too... lighty's authentication options are a bit lacking at the moment. PAM would open the way to using MySQL, SQLite and every other PAM module out there. This is preventing me migrating an Apache instance over at the moment.
-- David Anderson
Updated by darix over 10 years ago
Replying to email@example.com:
The reason I'd like PAM is mainly just to work with the existing users on my system (that have SSH access). Will the other options allow this?
sure. i can understand that. but the price is too high imho.
even if you give lighttpd read permissions on the file and not run it as root. with a simple hole in a webapplication your shadow file could be retrieved and the whole server would be compromised.
the other options would allow pam auth yes.
Updated by Anonymous about 10 years ago
- Status changed from Fixed to Need Feedback
- Resolution deleted (
Ok, Reasons for PAM:
- PAM provides a flexible implementation of many methods to authenticate somebody/something.
- PAM is NOT a securityhole. You are allowed to you something else then /etc/shadow. But you are allowed to use /etc/shadow, if you want.
- PAM provides every authentication-method (1), which you can want to implement in lighttpd, but NOW.
- Use PAM and you can remove some code. It provides everything, you need.
PAM allowes it, doesn't restrict it.
(1) TLS-Auth and something else isn't possible.
Updated by darix about 10 years ago
- Status changed from Need Feedback to Fixed
- Resolution set to wontfix
many people will want to use shadow based auth. that requires root permissions. we dont have an authentication helper that runs as root.
to not create false assumptions or get user running their webserver as root, we dropped the feature.
Updated by pprkut over 6 years ago
I'm not a PAM expert, but I saw that MariaDB (MySQL fork) recently added a PAM authentication plugin. IMHO a database server has similar constraints about not running as root as a webserver.
In their wiki-page ( http://kb.askmonty.org/en/pam-authentication-plugin ) they have the following note:
if you configure PAM to use pam_unix.so and notice that MariaDB needs to run as a root user to be able to access /etc/shadow — try to upgrade your PAM installation. Newer versions of PAM do not require pam_unix.so to be run as root.
Updated by stbuehler over 6 years ago
You would either need a daemon running as root providing access (but then it wouldn't be pam_unix anymore), or you need a suid binary. There is only a suid binary for checking the password for your own user (for things like locking the screen).
Providing a simple way of checking passwords for local users would be STUPID (preventing that is the point of shadow after all).
Updated by yurylankovskiy 13 days ago
The same patch updated for 1.4.45.
Hello sravas, can you please share some information with me on how you've integrated the patch. I'm running 1.4.48 version of lighttpd, but it should not matter.
1. How did you compile --with-pam? Any dependencies included?
2. After compilation, you've moved mod_authn_pam.so to libraries folder and included "mod_authn_pam" in the lighttpd config?
The issue I'm having, is I'm able to compile with just the --with-pam flag, after I can see that lighttpd has pam included in the list of modules. Lighttpd restarts successfully, however, I get out of memory issues if I include the "mod_authn_pam".
I would highly appreciate, if you share some of your knowledge.
Also, would be nice to see a sample of your pam configuration from lighttpd.config
Also available in: Atom