Skip to content
This repository was archived by the owner on Dec 26, 2020. It is now read-only.

Commit fa2cf79

Browse files
authored
Merge pull request #320 from dev-sec/pam
add separate option for controlling motd via pam
2 parents 83a6d88 + 5cf53b2 commit fa2cf79

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Warning: This role disables root-login on the target server! Please make sure yo
4545
|`ssh_authorized_principals_file` | '' | specifies the file containing principals that are allowed. Only used if ssh_trusted_user_ca_keys_file is set. |
4646
|`ssh_authorized_principals` | [] | list of hashes containing file paths and authorized principals, see default_custom.yml for all options. Only used if ssh_authorized_principals_file is set. |
4747
|`ssh_print_motd` | false | false to disable printing of the MOTD|
48+
|`ssh_print_pam_motd` | false | false to disable printing of the MOTD via pam (Debian and Ubuntu)|
4849
|`ssh_print_last_log` | false | false to disable display of last login information|
4950
|`sftp_enabled` | false | true to enable sftp configuration|
5051
|`sftp_umask` | '0027' | Specifies the umask for sftp|

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ ssh_authorized_principals: [] # sshd
133133

134134
# false to disable printing of the MOTD
135135
ssh_print_motd: false # sshd
136+
ssh_print_pam_motd: false # sshd
136137

137138
# false to disable display of last login information
138139
ssh_print_last_log: false # sshd

tasks/hardening.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@
6161
control: optional
6262
module_path: pam_motd.so
6363
state: absent
64+
backup: yes
6465
when:
6566
- ssh_server_hardening | bool
6667
- ssh_pam_support | bool
67-
- not (ssh_print_motd | bool)
68+
- not (ssh_print_pam_motd | bool)
6869

6970
- name: create ssh_config and set permissions to root/644
7071
template:

0 commit comments

Comments
 (0)