First of all, hello everyone.
I edited the openvpn server.conf file according to the instructions and created a new pam file (/etc/pam.d/openvpn) in the system. My configuration settings are as follows.
#The SSL certificate was created with Let's Encrypt.
auth [success=1 default=ignore] /lib64/security/pam_privacyidea.so url=https://mydomain.org prompt=privacyIDEA_Authentication
auth requisite pam_deny.so
auth required pam_permit.so
account sufficient pam_permit.so
session sufficient pam_permit.so
When authenticating with openvpn, if I only enter the otp code, the login request is successful. However, if I enter the otp code followed by the password, the login request fails. What could I be doing wrong?
Well, this is how you have configured your system!
The contents of what your are typing in at the password prompt is sent to the privacyIDEA server.
The privacyIDEA server verifies it according to your configuration.
Thus: Works as configured. So you have to look into the configuration of your privacyIDEA server.
You might probably want to take a look at the otppin policy. But this is all wild guessing, since we do not know anything about your users and your policies.