Day 3 - Power trip [Automatically] #3
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 1: open the correct access channel
Perform these actions via Ansible, root / public key auth already configured.
~/.ssh/authorized_keys
.sudo
and give the new user passwordless group membership.Phase 2: close the incorrect access channels (Basic Hardening)
Perform these actions via Ansible, admin user / public key auth configured in the previous step
generating the user's password requires putting a hash into the playbook.
mkpasswd --method=sha-512
(debianwhois
package)To correct this, I'm using the
vars
andvars_prompt
sections.passlib
Linux module is now required.To avoid the prompt, the
passhash
variable can be given a value at the command line. Just setting the variable doesn't work, it has to be encrypted:But this doesn't hash correctly, because the password gets a trailing newline. So, I'm struggling to make this fully unattended.
I'm an idiot, because
mkpasswd
takes a password as an argument.PASSHASH=$(mkpasswd $PW --method=sha-512 -s)