Skip to content

Instantly share code, notes, and snippets.

@mlaferrera
Created March 19, 2015 00:51
Show Gist options
  • Save mlaferrera/8a7af4f77b0183f9f651 to your computer and use it in GitHub Desktop.
Save mlaferrera/8a7af4f77b0183f9f651 to your computer and use it in GitHub Desktop.
Disable automatic login with Custom Ubuntu Remix
## Ensure you are chroot'ed into the image source
sed -i -e "s/if \[ -n \"\$USERNAME\" \]/if \[ -n \"\" \]/" /usr/share/initramfs-tools/scripts/casper-bottom/25configure_init
## use `mkpasswd` to generate the password to replace below
sed -i -e "s/U6aMy0wojraho/NEW PASSWORD HASH/" /usr/share/initramfs-tools/scripts/casper-bottom/25adduser
# Ensures all changes made to casper are in the image.
update-initramfs -u -k all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment