Skip to content

Commit

Permalink
Correct default user name in shell provisioner
Browse files Browse the repository at this point in the history
  • Loading branch information
jsf9k committed Aug 23, 2024
1 parent 5b35e83 commit 950590d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/packer.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ build {
# We need to call bash here because after hardening /tmp has the
# noexec bit set on it.
execute_command = "chmod +x {{ .Path }}; sudo env {{ .Vars }} bash {{ .Path }} ; rm -f {{ .Path }}"
inline = ["sed -i '/^users:/ {N; s/users:.*/users: []/g}' /etc/cloud/cloud.cfg", "rm --force /etc/sudoers.d/90-cloud-init-users", "rm --force /root/.ssh/authorized_keys", "/usr/sbin/userdel --remove --force admin"]
inline = ["sed -i '/^users:/ {N; s/users:.*/users: []/g}' /etc/cloud/cloud.cfg", "rm --force /etc/sudoers.d/90-cloud-init-users", "rm --force /root/.ssh/authorized_keys", "/usr/sbin/userdel --remove --force ubuntu"]
skip_clean = true
}
}

0 comments on commit 950590d

Please sign in to comment.