The Ubuntu installer helpfully saves a copy of the initial user's password hash ...

@marshray@infosec.exchange

The Ubuntu installer helpfully saves a copy of the initial user's password hash in /etc/cloud/cloud.cfg.d/99-installer.cfg.