Create Linux Users on mounted disk image
Hi Everyone,
I'm currently in the middle of developing an automatic system which can provision Linux VMs automatically. Let's say I have a disk image which has a Linux distro installed on it. How would I change the root password on that, without having to boot the OS? It would be nice if I could just simply run passwd with some switch to point to the /etc/shadow file on the (mounted) VM disk image.. Any help would be appreciated Thanks |
Hi jonnytabpni,
You can use chroot for that. Ex: your image is mounted in /mnt/myImage Code:
chroot /mnt/myImage |
angel115, Thanks!! :)
|
All times are GMT -5. The time now is 10:15 AM. |