Is there a way to find out if the shell Ubuntu root password is a certain word?
I deliver an image with a full Ubuntu installation to my customers, that has a certain root password.
I would like to add a check if the server is secure now, so I would like to try out the known standard password and if it is still the standard it should give out a warning that the rootpassword must be changed.
I don't want to brute force the server, I already know the standard-password and just want to check, if the new admin has changed the standard root-password, that was set in the Image that was used to copy the server.
I thought of something like
exec('ssh root@localhost --password=my_known_standard_pass')
Or maybe I could somehow create a shell script, that logs in with the sshkey stored somewhere that tries out the login and returns the success or not.