Change Ubuntu Cloud Image Password

Ubuntu cloud image is very good for deploy a simple qemu image system.
But the image has it owns password and initial script.

If want to use it, it needs to add new username and password into it.
and remove some packages.

Download cloud Image from ubuntu, ex: download Ubuntu Zesty Cloud Image

wget https://cloud-images.ubuntu.com/zesty/current/zesty-server-cloudimg-arm64.img

If locate in Taiwan, there is Taiwan mirror site,http://ftp.yzu.edu.tw/Linux/ubuntu-cloud-images/, it would be fast then cloud-images.ubuntu.com

wget http://ftp.yzu.edu.tw/Linux/ubuntu-cloud-images/zesty/current/zesty-server-cloudimg-arm64.img

Zesty only has UEFI image, so, there is no -disk1 or -uefi postfix keyword.

Install backdoor-image package, this program can help to install new username and password into cloud image.

cd backdoor-image 
sudo ./backdoor-image --user ubuntu --password ubuntu --password-auth ../zesty-server-cloudimg-arm64.img
sudo ./backdoor-image --user test --password 123456 --password-auth ../zesty-server-cloudimg-arm64.img

After boot, remove unnecessary packages.

sudo su -
apt remove cloud-initramfs-copymods cloud-init

On this day..

Share and Enjoy:
  • Print
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • Plurk
Related Posts
Leave a comment ?

0 Comments.

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>