# Warning: This file is auto-generated and might be overwritten by
#          univention-config-registry.
#          Please edit the following file(s) instead:
# Warnung: Diese Datei wurde automatisch generiert und kann durch
#          univention-config-registry überschrieben werden.
#          Bitte bearbeiten Sie an Stelle dessen die folgende(n) Datei(en):
# 
#     /etc/univention/templates/files/etc/pam.d/openvpn
# 

@!@
hostname = baseConfig.get('hostname')
domainname = baseConfig.get('domainname')
url = baseConfig.get('privacyidea/pam/url', 'https://%s.%s/privacyidea' % (hostname, domainname))
prompt = baseConfig.get('privacyidea/pam/prompt', 'OTP: ')
realm = baseConfig.get('privacyidea/pam/realm', '')

pam_config = '''
auth     sufficient     pam_python.so /usr/share/privacyidea/privacyidea_pam.py url=%s prompt=%s realm=%s cacerts=/etc/univention/ssl/ucsCA/CAcert.pem
''' % (url, prompt, realm)

if baseConfig.is_true('privacyidea/pam/enable', False):
        print pam_config

@!@

@include ldaponly-auth

@include common-account
@include common-session
@include common-password
