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 over 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 about 11 years ago
Replying to firstname.lastname@example.org:
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 over 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 over 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 almost 7 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 almost 7 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 5 months 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
Updated by akschu1 about 1 month ago
I have updated the code to work with 1.4.50 and I have it working with nss-pam-ldapd which solves a number of problems for me:
1. The current mod_authn_ldap module doesn't tls encrypt the bind-dn user. See #2909
2. It's easier to have the ldap search config in one place instead of multiple places.
3. The config is much simpler.
4. The nss-pam_ldapd config allows me to define multiple ldap servers for redundancy.
Here is the config to make it work:
auth.backend = "pam"
auth.backend.pam.service-name = "lighttpd"
Updated by gstrauss about 1 month ago
- Status changed from Wontfix to Patch Pending
- Target version set to 1.4.51
Thanks @akschu1. I have similar code in my tree. As you found, it is straightforward to create a simple, blocking request to PAM. Before releasing mod_authn_pam, I've wanted to implement a caching layer for all mod_auth modules (see #2805), since all are blocking. ...I'll reconsider releasing mod_authn_pam sooner since it fills some needs.
Also available in: Atom