summaryrefslogtreecommitdiff
path: root/data/templates/system-login/pam_radius_auth.conf.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates/system-login/pam_radius_auth.conf.tmpl')
-rw-r--r--data/templates/system-login/pam_radius_auth.conf.tmpl16
1 files changed, 16 insertions, 0 deletions
diff --git a/data/templates/system-login/pam_radius_auth.conf.tmpl b/data/templates/system-login/pam_radius_auth.conf.tmpl
new file mode 100644
index 000000000..ec2d6df95
--- /dev/null
+++ b/data/templates/system-login/pam_radius_auth.conf.tmpl
@@ -0,0 +1,16 @@
+# Automatically generated by system-login.py
+# RADIUS configuration file
+{% if radius_server %}
+# server[:port] shared_secret timeout source_ip
+{% for s in radius_server|sort(attribute='priority') if not s.disabled %}
+{% set addr_port = s.address + ":" + s.port %}
+{{ "%-22s" | format(addr_port) }} {{ "%-25s" | format(s.key) }} {{ "%-10s" | format(s.timeout) }} {{ radius_source_address if radius_source_address }}
+{% endfor %}
+
+priv-lvl 15
+mapped_priv_user radius_priv_user
+
+{% if radius_vrf %}
+vrf-name {{ radius_vrf }}
+{% endif %}
+{% endif %}