Edit VM image and make passwordless

Either with guestfish or virt-edit this can be done

virt-edit -d centos /etc/passwd -e ‘s/^root:.*?:/root::/’

virsh # start centos
Domain centos started

virsh # console centos
Connected to domain centos
Escape character is ^]

CentOS Linux 7 (Core)
Kernel 3.10.0-229.el7.x86_64 on an x86_64

localhost login: root
Last failed login: Thu Sep 10 09:41:52 UTC 2015 on ttyS0
[root@localhost ~]#

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s