Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Automate the Ignition password setting step from
# Automate the password setting step from
# 1. Ask for a password interactively.
# 2. Make an ignition.iso for setting root's password to that.
# An existing ignition.iso will be overwritten.
# Required commands
# openssl
# mkisofs
# sudo zypper install mkisofs openssl
set -eu
IGNDIR=$(mktemp --directory ignition.XXXXXX)
mkdir -p "$IGNDIR"/ignition
cat > "$CONFIG" <<EOF
"ignition": { "version": "3.1.0" },
"passwd": {
"users": [
"name": "root",
"passwordHash": "@PASSWORDHASH@"
echo >&2 "Choose a password. I will write ignition.iso with that password for root."
PASSWORDHASH="$(openssl passwd -6)"
mkisofs -o ignition.iso -V ignition -quiet "$IGNDIR"
rm -rf "$IGNDIR"
echo >&2 Done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment