I need to set up PAM to behave in such way: when user id meets some condition it should be chroot'ed to some directory.
I tried this:
Code:
session required pam_limits.so
session required pam_unix.so
session requisite pam_succeed_if.so uid > 50000
session sufficient pam_chroot.so debug chroot_dir=/opt/MYHOME
but it simply does not allow to login
when I change
requisite to
required it chroot's everyone.
Any suggestions.
P.S. (This may help) There is PAM
new syntax, but it does something strange for me