This is similar to this question: Allow user1 to su - user2 without passwordHowever, the solution only work for multiple users accessing suing ONE user.#works fine :) 2 or more users accessing 1 userauth       [success=ignore default=1] pam_succeed_if.so user = user1auth       sufficient   pam_succeed_if.so use_uid user = user2auth       sufficient   pam_succeed_if.so use_uid user = user3If I try to go n-users to n-users:#dont work :(auth       [success=ignore default=1] pam_succeed_if.so user = user1auth       sufficient   pam_succeed_if.so use_uid user = user2auth       sufficient   pam_succeed_if.so use_uid user = user3auth       [success=ignore default=1] pam_succeed_if.so user = user4auth       sufficient   pam_succeed_if.so use_uid user = user2auth       sufficient   pam_succeed_if.so use_uid user = user3I get PAM errors or get asked for input the password.
Allow multiple users to su to multiple other users without password
users;su;pam