Revert "Revert "Merge #2692: Use pam_env to properly setup system-wide env""

This reverts commit 491c088731022463978e595956427e72db6306a9.