Webmin Change Password (as per installation documentation)

has anyone actually checked this script to make sure it works?

I have copy and pasted this as exactly shown below...

Setting a root password If your system does not have a password set for the root user, you will need to set a Virtualmin root password before you can login on port 10000. This can be the case when installing on an EC2 instance that uses an SSH key to login as root, or an Ubuntu system that uses sudo.

To set a root password for Virtualmin, run the command :

/usr/{share,libexec}/webmin/changepass.pl /etc/webmin root XYZ

where XYZ is the password you want to use. Make sure it is strong, as an attacker who guesses this password would have full control over your system.

however, because i was just copy and pasting as i was reading i missed the part underneath where is says "where xyz is the password you want to use". I then ran the command again...however, now i cannot login no matter what i try.

Ubuntu gives me an error now when i try to re run the script...

/usr/libexec/webmin/changepass.pl: command not found

What do i do now?

Actually, I think the above documentation is wrong. At least for my Googl Cloud Instance, in ubuntu 16.04 i had to set my password using SSH

root@"your hostname":~# passwd Enter new UNIX password: "enter your desired password here" Retype new UNIX password: "repeat your desired password" passwd: password updated successfully




Yeah setting a password for the root user via SSH is one of the ways to resolve the issue you're seeing there.

If the root user has a password, it's not necessary to run the command you see above.

The above command should still work, though it tries to look for the command in two locations. To just run it using the Ubuntu location, you could try this:

/usr/share/webmin/changepass.pl /etc/webmin root YOUR_PASSWORD

Where did you see the message about setting a root password though? I don't believe I've run into that message before.

That said, it should be correct if the root user isn't able to log in, but I wanted to get a better picture of what's going on there. Thanks!

Hi Andrew, that error message popped up when i attempted to rerun the password script (which i assume would be normal as i figured the script is only meant to be run once)