bundles/users: get default user data from users.json
This commit is contained in:
parent
c090a9c2c2
commit
cca4fec761
5 changed files with 52 additions and 19 deletions
|
@ -30,7 +30,11 @@ for username, attrs in node.metadata['users'].items():
|
|||
|
||||
user['home'] = home
|
||||
user['shell'] = '/bin/bash'
|
||||
user['password_hash'] = 'x'
|
||||
|
||||
if 'password' in attrs:
|
||||
user['password'] = attrs['password']
|
||||
else:
|
||||
user['password_hash'] = 'x' if node.use_shadow_passwords else '*'
|
||||
|
||||
if 'groups' in attrs:
|
||||
user['groups'] = attrs['groups']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue