From d0a3f993420a518c930c7886a60922005aa42beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Thu, 17 Oct 2019 13:46:21 +0200 Subject: [PATCH] stages/users: set authorized_keys file permissions to 600 Otherwise user may be unable to login. More information: https://stackoverflow.com/questions/6377009/adding-public-key-to-ssh-authorized-keys-does-not-log-me-in-automatically --- stages/org.osbuild.users | 1 + 1 file changed, 1 insertion(+) diff --git a/stages/org.osbuild.users b/stages/org.osbuild.users index 67ba93d7..3c593a75 100755 --- a/stages/org.osbuild.users +++ b/stages/org.osbuild.users @@ -68,6 +68,7 @@ def add_ssh_key(root, user, key): f.write(f"{key}\n") os.chown(authorized_keys, int(uid), int(gid)) + os.chmod(authorized_keys, 0o600) def main(tree, options):