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}'