-
Notifications
You must be signed in to change notification settings - Fork 17
privacyidea_pam.py always set authtok in pam #11
Comments
Hi, Bumping this, as the PR has fixed a problem for us. We were trying to migrate from the old LinOTP2 module written in C (https://github.com/LinOTP/linotp-auth-pam) I've been testing with Here's the previous working config for reference: /etc/pam.d/common-linotp
/etc/pam.d/common-auth
/etc/pam.d/sudo
This was fine, so we created a new config like this: /etc/pam.d/common-privacyidea
/etc/pam.d/common-auth
/etc/pam.d/sudo
But this fails, here's what the logs look like:
Turns out that no matter what you set the If you change the order like this it works again:
But that's just annoying, I should not be forced to do that! Something is not behaving as documented. ANYWAY, my colleague found the PR referenced in this post and I applied the changes and it now works. Config looks like this: /etc/pam.d/common-privacyidea
/etc/pam.d/common-auth
/etc/pam.d/sudo
For now I will fork this script into our company GitHub so I can use it without having to patch it with Ansible each time it gets pulled, but it would be great if you could accept this PR. It prevents the behaviour of the token being passed to subsequent PAM modules, thus preventing them from demanding a new password. I don't fully understand why PAM behaves like this, and way Thanks, Greg |
If privacyidea_pam.py is called, it always sets the authtok variable in pam. If pam_unix is executed after privacyidea_pam.py it won't prompt for a user password and instead tries to use the authtok taken from the previous module.
I've made a pull request which adds an option to prevent this.
#10
The text was updated successfully, but these errors were encountered: