Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is there a way to change location of /etc/pam.d directory, or is it hardcoded into PAM? can't it be changed with some environment variable for specific client programs?

for example:

PAM_CONFIG_ROOT=/tmp/pam_test_configs pam_client_app

or it can't be done for some reason I don't see now?

share|improve this question
up vote 0 down vote accepted

The pam(8) manual page says explicitly that it considers /etc/pam.conf but only if /etc/pam.d/ doesn't exist. No mention whatsoever of alternative places. The definite guide is here.

Either arrange for your modules to be called only by you, or use a virtual machine set up for testing.

share|improve this answer
Thanks. I'm gonna use the virtual machine approach. – mighq Mar 14 '13 at 13:15

I looked into the Linux PAM sources. /etc/pam.conf, /etc/pam.d are hardcoded there. :(

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.