In the MAAS “Debugging ephemeral image” section, you are provided with steps on how to create a user called “backdoor” with the password “ubuntu”. Nowhere in these steps does it provide the steps to revert these changes, even though all the first step of the guide is doing is creating a backup. Once you are done with your backdoor, you can revert these changes using the following command.

imgs=$(echo /var/lib/maas/boot-resources/*/*/*/*/*/*/root-image)

for img in $imgs; do

[ -f “$img.dist” ] && sudo mv -f $img.dist $img