From ca353ed406bc46f09b168eb4be25edd2c9594cd7 Mon Sep 17 00:00:00 2001 From: John Van de Meulebrouck Brendgard Date: Fri, 17 Nov 2023 13:50:02 +0100 Subject: [PATCH] Set same permissions for /root/.ssh/authorized_keys in post-tasks.d/010fix-ssh-perms as is done by Puppet with sunet::ssh_keys. --- global/post-tasks.d/010fix-ssh-perms | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global/post-tasks.d/010fix-ssh-perms b/global/post-tasks.d/010fix-ssh-perms index 87636d7..f32a6a4 100755 --- a/global/post-tasks.d/010fix-ssh-perms +++ b/global/post-tasks.d/010fix-ssh-perms @@ -17,7 +17,7 @@ if test -f /root/.ssh/authorized_keys; then if test `stat -t /root/.ssh/authorized_keys | cut -d\ -f5` != 0; then chown root.root /root/.ssh/authorized_keys fi - if test `stat --printf=%a /root/.ssh/authorized_keys` != 600; then - chmod 600 /root/.ssh/authorized_keys + if test `stat --printf=%a /root/.ssh/authorized_keys` != 440; then + chmod 440 /root/.ssh/authorized_keys fi fi