From 716c166dc72fca6e8b6e20d83f7e0c6ecec9cb06 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Fri, 25 Jun 2021 17:58:30 +0200 Subject: [PATCH] wip --- bundles/users/items.py | 1 + bundles/users/metadata.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/bundles/users/items.py b/bundles/users/items.py index bde0177..5ddeba9 100644 --- a/bundles/users/items.py +++ b/bundles/users/items.py @@ -10,6 +10,7 @@ for name, config in node.metadata.get('users').items(): directories[config['home']] = { 'owner': name, + 'mode': '700', } files[f"{config['home']}/.ssh/id_{config['keytype']}"] = { diff --git a/bundles/users/metadata.py b/bundles/users/metadata.py index aec3ed5..7582baf 100644 --- a/bundles/users/metadata.py +++ b/bundles/users/metadata.py @@ -21,6 +21,9 @@ def user(metadata): 'authorized_keys': [] } + if not 'full_name' in config: + users[name]['full_name'] = name + if not 'home' in config: users[name]['home'] = f'/home/{name}'