In the past, I've used the passwd command in scripts to set a default password for new Linux accounts, as per this example: -
useradd -g wasadmins -d /home/wasadmin wasadmin
echo "passw0rd" | passwd wasadmin --stdin
( remembering that this is for NON-PROD boxes ONLY )
However, things appear to have changed, as that didn't work on Ubuntu 18.0.4
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS