Skip to content
Snippets Groups Projects
Commit db2a1bf3 authored by Kristian Klausen's avatar Kristian Klausen :tada:
Browse files

Restrict the users on mail.a.o to the passwd command

The users are only meant as a way to change the mail password and
setting up forwarding (~/.forward), the latter will be handled by the
DevOps team now.
parent 4104404f
No related branches found
No related tags found
1 merge request!450Restrict the mail users to passwd and decouple the mailboxes from the system user
......@@ -15,7 +15,7 @@
- { role: rspamd, rspamd_dkim_domain: archlinux.org, tags: ["mail"] }
- { role: unbound, unbound_port: 5353, tags: ["mail"] }
- { role: postfwd, tags: ['mail'] }
- { role: archusers }
- { role: archusers, archusers_ssh_options: 'command="/usr/bin/passwd",restrict,pty' }
- { role: fail2ban }
- { role: prometheus_exporters }
- { role: promtail }
......
#jinja2: lstrip_blocks: True
{{ lookup('file', '../pubkeys/' + item.value.ssh_key) }}
{% set keys = [item.value.ssh_key] %}
{% if item.value.additional_ssh_keys is defined %}
{% for key in item.value.additional_ssh_keys %}
{% if inventory_hostname in key.hosts or 'all' in key.hosts %}
{{ lookup('file', '../pubkeys/' + key.name) }}
{{- keys.append(key.name) -}}
{% endif %}
{% endfor %}
{% endif %}
{% for key in keys %}
{% if archusers_ssh_options is defined %}
{{ lookup('file', '../pubkeys/' + key) | regex_replace('(.*\S.*)', archusers_ssh_options + ' \\1') }}
{% else %}
{{ lookup('file', '../pubkeys/' + key) }}
{% endif %}
{% endfor %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment