Locked out of system

4 posts / 0 new
Last post
#1 Wed, 11/07/2018 - 13:27
jafinn

Locked out of system

Hi

I managed to change the wrong firewall rule and lock myself out of SSH access on a remote system.. The webmin password was automatically generated so I have no idea what it was as I always access it through cloudmin.

I've retrieved a password from /etc/webmin/servers but I suspect it's hashed? Is it possible to "unhash" it?

Wed, 11/07/2018 - 14:33
andreychek

Howdy,

Note that Webmin uses the same root password as you'd use via SSH. So if you're able to access a root account via SSH, you should be able to do that in Webmin as well.

However, if you're unable to log in using Webmin, and unable to log in over SSH, you may need to use the console instead.

That said, are you able to run commands on your server using Cloudmin? If so, you could always use that to disable the firewall.

-Eric

Thu, 11/08/2018 - 03:53 (Reply to #2)
jafinn

Hi, thank you for replying.

SSH is keys only so I don't use a password for that. And the SSH port is blocked. There's no console access, if I can't figure it out I'd have to just nuke it and start over.

Cloudmin has webmin access but as soon as it lost SSH access it is no longer possible to access webmin through it. It is possible for cloudmin to work with SSH access only but not with only webmin access? It just gives up. When the system is up I can retrieve the root password from the GUI but now when the system is inaccessible I can't get to the menu where you can change the webmin login, only SSH credentials.

Thu, 11/08/2018 - 10:08
andreychek

Well, for any of the users with root level access, such as root or a user with sudo access, if those users have any sort of password set you should be able to use that to log into Webmin/Virtualmin.

Cloudmin does use SSH for a lot of it's remote access, so it being unable to access this system now that SSH is unavailable makes sense.

However, if you don't have passwords for any users with root or sudo access, and you don't have console access, that is indeed a bit of a pickle!

Note that if this system is a Virtual Machine that you control, there are ways to access the system through the image file.

Topic locked