launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #11718
[Merge] lp:~smoser/maas/eph-passwd into lp:maas
Scott Moser has proposed merging lp:~smoser/maas/eph-passwd into lp:maas.
Requested reviews:
MAAS Maintainers (maas-maintainers)
For more details, see:
https://code.launchpad.net/~smoser/maas/eph-passwd/+merge/123300
if enlistment fails, offer login for debug
This sets a username password of 'ubuntu:ubuntu' if the user enlistment
process fails, and prints a message to the screen about the ability
to login with those credentials.
Upon login, a file is touched in /tmp , and if that file is present after
the script sleeps for 60 seconds, then the reboot is aborted.
In the default images, ssh via password auth is disabled, so unless that
is *enabled*, there is no concern of remotely coming in as that user.
--
https://code.launchpad.net/~smoser/maas/eph-passwd/+merge/123300
Your team MAAS Maintainers is requested to review the proposed merge of lp:~smoser/maas/eph-passwd into lp:maas.
=== modified file 'contrib/preseeds_v2/enlist_userdata'
--- contrib/preseeds_v2/enlist_userdata 2012-08-31 18:58:55 +0000
+++ contrib/preseeds_v2/enlist_userdata 2012-09-07 15:55:22 +0000
@@ -19,14 +19,24 @@
echo =============================================
sleep 10
else
- # we could set a password here and allow user at console to login
+ user="ubuntu"
+ pass="ubuntu"
+
+ echo "$user:$pass" | chpasswd
+ bfile="/tmp/block-reboot"
+ { echo "#!/bin/sh"; echo "touch $bfile"; } > /etc/profile.d/A01-block.sh
+ chmod 755 /etc/profile.d/A01-block.sh
echo
echo =============================================
echo "failed to enlist system maas server '$host'"
echo "sleeping 60 seconds then poweroff"
+ echo
+ echo "login with '$user:$pass' to debug and disable poweroff"
+ echo
cat /tmp/enlist.out
echo =============================================
sleep 60
+ [ -e $bfile ] && exit 0
fi
poweroff