ironic-python-agent-builder/dib/ironic-python-agent-ramdisk/static/usr/local/bin/ironic-python-agent-create-rescue-user.sh
Dmitry Tantsur 18d161bdc3 DIB: add missing ironic-python-agent-create-rescue-user.sh
And remove gitignore rules that prevented it from being added.

Change-Id: If2a52d98ffd94eacc7b2166a4fe553850ba084d0
2019-08-27 09:52:30 +02:00

10 lines
255 B
Bash
Executable File

#!/bin/bash
set -eux
set -o pipefail
echo "Adding rescue user with root privileges..."
crypted_pass=$(</etc/ipa-rescue-config/ipa-rescue-password)
useradd -m rescue -G wheel -p $crypted_pass
echo "rescue ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/rescue