Update PermitRootLogin task to work on Debian 11
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Ludovic Poujol 2022-06-21 15:13:33 +02:00
parent 050c61c220
commit 519ef930df
3 changed files with 5 additions and 2 deletions

View file

@ -16,6 +16,9 @@ The **patch** part changes is incremented if multiple releases happen the same m
### Fixed ### Fixed
* evolinux-base : Update PermitRootLogin task to work on Debian 11
* evolinux-user : Update PermitRootLogin task to work on Debian 11
### Removed ### Removed
### Security ### Security

View file

@ -91,7 +91,7 @@
- name: disable SSH access for root - name: disable SSH access for root
replace: replace:
dest: /etc/ssh/sshd_config dest: /etc/ssh/sshd_config
regexp: '^PermitRootLogin (yes|without-password|prohibit-password)' regexp: '^#?PermitRootLogin (yes|without-password|prohibit-password)'
replace: "PermitRootLogin no" replace: "PermitRootLogin no"
validate: '/usr/sbin/sshd -t -f %s' validate: '/usr/sbin/sshd -t -f %s'
notify: reload sshd notify: reload sshd

View file

@ -56,7 +56,7 @@
- name: disable root login - name: disable root login
replace: replace:
dest: /etc/ssh/sshd_config dest: /etc/ssh/sshd_config
regexp: '^PermitRootLogin (yes|without-password|prohibit-password)' regexp: '^#PermitRootLogin (yes|without-password|prohibit-password)'
replace: "PermitRootLogin no" replace: "PermitRootLogin no"
notify: reload sshd notify: reload sshd
when: evolinux_root_disable_ssh | bool when: evolinux_root_disable_ssh | bool