Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
vm_password [2015/04/03 16:45]
imcsk8
vm_password [2019/03/21 22:55]
imcsk8
Line 2: Line 2:
 \\ \\
  
 +===== Recommended ====
 +<​code>​
 +# virt-customize -a /​var/​lib/​libvirt/​images/​vmtest01.qcow2 --root-password password:​redhat --ssh-inject '​root:​file:/​home/​user/​.ssh/​id_rsa.pub' ​
 +</​code>​
 +
 +
 +===== Manually =====
   * Create the new password ​ and copy it   * Create the new password ​ and copy it
   * Enter the image,   * Enter the image,
Line 13: Line 20:
 <​code>​ <​code>​
 # openssl passwd -1 <​password>​ # openssl passwd -1 <​password>​
-$1$lkeEz0u8$SGtJoqKAtY5l2mDgF/​FYt/ ​ (copy this ok keep it handy)+$1$lkeEz0u8$SGtJoqKAtY5l2mDgF/​FYt/ ​ (copy this or keep it handy)
 # guestfish --rw -a <​image-name>​ # guestfish --rw -a <​image-name>​
 ><​fs>​ run ><​fs>​ run
Line 22: Line 29:
 ><​fs>​ vi /etc/shadow ><​fs>​ vi /etc/shadow
 </​code>​ </​code>​
 +