-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Hello,
Would you consider adding a random password to the user creation 'cause otherwise the account is locked and passwordless keys will not work.
Try this role and then dev-sec.ssh-hardening. You will not be able to login at all.
- name: Create user
user:
generate_ssh_key: "{{ user_generate_ssh_key }}"
groups: "{{ (user_groups | join(',')) }}"
append: True
name: "{{ user_name }}"
shell: "{{ user_shell }}"
# this generates a hashed and random uuid string
password: "{{ 9999999999999999999999 | random | string | to_uuid | password_hash('sha512', 65534 | random | string) }}"
update_password: on_create
Metadata
Metadata
Assignees
Labels
No labels