I'm setting up an LDAP server and libpam-ldap
to run on the same host, communicating via a UNIX domain socket. I'd like to give this socket the minimum permissions necessary, so random local users can't try binding to LDAP and guessing other users' passwords. However, I can't figure out what user PAM is running as during authentication.
I've tried giving ownership of the socket and containing directory to every user on the system, to no avail. The only thing that seems to work is setting a+rwx
on them, which I'd rather not do.