Solved Forgot root password of EC2 instance

I have an FreeBSD EC2 instance running 14.3-RELEASE.
I can log in as ec2-user via SSH key file.
But I do not recall the root password. Obviously it is set since su - prompt me for a password.
Any ideas what I can do?
 
My current try:
Deploy another FreeBSD instance, import the zpool of the "forgotten password" instance, mount it and chroot into it.
 
Ok solved it by installing an new FreeBSD image with UFS, then imported the zpool of the forgotten-password-image, mounted it and chrooted to it, followed by a passwd.
(with a new ZFS FreeBSD image this did not work, it got confused by the 2 zpools with the same default name)
 
Back
Top