Cannot login on new install

I am installing this on my desktop Kubuntu LTS 24.04 to test going from Almalinux to Ubuntu. This is the second install, the first time it did this, but a reboot fixed it, but not this time.

This install is behind a NAT, and not accessible from the outside, so I have to use my local IP to access web apps installed, but I can access this via a domain that points to my external IP, but this only works on ports 100000, as I opened it up, but ports 80, and 443, and only work inside the NAT.

I had this working, so the NAT should not be an issue, but I have to mention it, as it might affect the install, which had no issues installing both times. Well besides the license server being down, I waited for it to get back up before trying again.

I could uninstall and reinstall it, but I wanted to find out if you want to check this out, and see what is up, as I would not want this to happen on the production server, as I am planing to change from Alma to Ubuntu, and this is why I am testing this out first.

This runs fine: virtualmin check-config, this is a new install, so there are no domains, as I cannot get past the login this time.

sudo cat /etc/webmin/miniserv.users
root:x:0
# changing it did not help
root:x::::::::0:0:::

This shows it is using root, and I can log into root from a terminal, as it will not allow me to log into the desktop with root.

I should point out that I have tested this on Ubuntu 24.04, then upgraded to KDE, and it worked fine, and the last two times, I used Kubuntu, and it worked fine. This issue happens every time I install it on Ubuntu or Kubuntu, only a reboot will normally resolve this. I know you do not support Kubuntu, but this is my desktop, on the server I will use Ubuntu, as it has no desktop, it is a VPS account. I see no difference in the base install, only the desktop changes to KDE, and I did test this in both, and did read on their site that this was the case.

I wanted to point out the things that are different in my environment, as this is a development, and not a production environment.

I read a lot of post about this issues logging in, but not like this, as this is repeatable. I installed this on my VPS, without rebooting, so this step means there is something wrong.

I downloaded the latest install each time, in case it changed.

I am testing this migration from Almalinux to Ubuntu because the last OS change did not go well, and I want to avoid that this time, and this is something that I would not want to happen on a production machine, but that is in production environment, so this might not be an issue there, but it here, only I cannot find others with the same issue, or at least it appeared that way to me.

My hardware is about 7 years old now, but the SSD is new. This is an AMD Thread Ripper with 16 cores, on an Asus motherboard, and it runs fine, all test pass.

This was a fresh install, did this 5 times this week, working on another project, that makes changes to the OS, that does not affect PHP, but all that testing happens after I install Virtualmin, the only thing I do first is update and reboot, so that is what call fresh. This is my test machine, but this week, all I am working on is testing the install, restore, and operation of the installation on Ubuntu, so I do not do any other testing that can affect that. I tell you this in case you want me to reinstall the OS, as I said, this is very repeatable. I can try other OSs, even the official Ubuntu, as that was the first time I noticed this, as all my test was in Almalinux or Rocky. I am moving to Ubuntu for newer software versions, and to have PHP in the repo, without having to add others.

Having removed php81 on Almalinux, not understanding it was the default php version, which caused issues, that I did resolve, it works now, but that was not the issue, it turned out to be the database, which was updated, twice not far apart, but that fixed it, but now I see a bottleneck, and need a new version, and I do want to mess with upgrading the SQL, as that might cause issues, so I want to change to Ubuntu for this reason, plus I get php 8.3.

I only try it 3 times, but have exceeded that this time, but not time wise, as fail2ban has no entries, as ssh ports are locked down, no one can access this behind this NAT, so I never get any bans, unlike the production server.

I have had skin cancer for years, and every year I have to go through aggressive treatments, and I am also on Chemo for something else, so my mind is not all there, so let me explain my steps.

  1. Install Ubuntu or Kubuntu, as it does mater, as long as it LTS 24.04.
  2. Update and reboot.
  3. Install Virtualmin Licenced.
  4. Log in, this always fails.
  5. Reboot and login again, this works 4 or of 5 times.

The first login always fails, and I did check that it is root. I am sure if I reinstalled this, it work after a reboot, but this getting old, and I need to know how to fix this.

I should not have to change my password unless it has changed, and this root, it uses the same password, this is my desktop behind a NAT, so if you cannot duplicate this, it is the NAT. If that is the case, I need a work a round.

I have PTSD, so the NAT in lockdown, so I do not trigger it, and why I have a VPS. I only open the ports I need, and block those I do not, so to replicate this, close ports 80, 443, shh, ftp. I only enable the ports Virtualmin needs for a development environment.

Years back we got the development licence, we have 11 virtual’s on a 50 license, which under is my partners account, as I pay for the VPS, and maintain the sites. I always test things here, before I make the change there, so I do not trigger it. I never had this issue before Ubuntu, which I tested, and went with Almalinux instead, as I was still having to support 7.4, which led to me removing all php but 8.2, in one command.

My wife and I are both medically retired Air Force, back in the 80’s, then the Gulf War, Kuwait, Koria, and back again, only not the same person, in war few understood the reason, which was slavery, the source of my PTSD. The war gave me the gift that keeps on giving, cancer from DU. I have issues, get upset and make mistakes, so I need to test things before I do them on a production machine.

I delete the default php81 on Almalinux because I did on my test machine to fix and issue, but it turned out to be a mistake that caused me a lot of upset, as it was a pain to get working a a production machine, the two are not the same, and I am sure this is my issue.

Ubuntu (Kubuntu) LTS 24.04
Usermin version |2.102|
Webmin version |2.202 |
Virtualmin version |7.20.2 Pro|

Thanks

It doesn’t show anything. You don’t need to manually edit files.

There’s way too much unrelated stuff in this question, it’s not clear to me what the problem is.

So, let’s clarify what problem we’re actually trying to solve.

Do you not get a login page at all? Is no login page the problem? So, no network connection or Webmin isn’t running.

Or, do you get a login failure when you try to login with the root user and password? (Or a sudo-capable user, if root doesn’t have a password set.)

I get a login screen, with:

 Warning!
Login failed. Please try again.

What happens when you try to login too many times, does fail2ban kick in after 5 try’s?

It is installed during the install, as this was a fresh install, and I see no sign it has ban my ip.

Update: I found out: Ignore 192.168.1.16 by ignoreself rule
Update 2: Forgot to mention that this does work.

webmin passwd root

So I am not locked out, this is about how to fix this the right way, and why this keeps happening in Ubuntu, as it never did this in Almalinux or Rocky.

Thanks.

If it fail2ban try this command

if you see your ip then unban with
fail2ban-client set webmin-auth unbanip xxx.xxx.xxx.xxx

add your IP to the ignore list in the jail.conf
uncomment this line and add the IP
ignoreip = xxx.xxx.xxx.xxx

restart fail2ban to enable
systemctl reload fail2ban

fail2ban adds a firewall rule, at which point you will be blocked at the network layer. i.e. no more login page. Webmin also has brute-force protection, which will continue to look like a login page after too many incorrect password attempts, but you won’t be able to login while you’re locked out by the brute-force protection.

I recommend you set the root password with the passwd command, and not the webmin passwd command. Using the webmin passwd command splits your root user into two users (a system user, still set to the password in /etc/shadow, and a Webmin user with a password in /etc/webmin/miniserv.users). Now that you’ve set one with webmin passwd, you’ll have to remember forever that the password is separate from the system root password. Past posts on the forum from others who’ve done this indicates you’ll eventually forget you’ve split the root user in two and will be unable to login at some point in the future because you’re trying the system root password instead of the Webmin root password.

But, that’s up to you.

It remains unclear what “happening” means.

Did you have a system root password to begin with? Able to log in as root on the terminal leaves that question unanswered, maybe you have an ssh key and logged in with that instead of a password. Or, maybe you logged in as a sudo-capable user and used sudo su to get to root. Neither of those means a root password is set, and Ubuntu does not set a root password during installation. Ubuntu gives you a system user that has sudo ALL capability from the beginning.

On Ubuntu that user (the sudo ALL capable user of whatever name you gave it) is the user you should use to log in to Webmin unless and until you set a root password.

Yes, I installed Ubuntu with a root password the same as the admin account, which is what I am using.

I am trying to be clear about what is going on.

I can sudo, su, and login as root, in the terminal, so I know it has a password, and I know what it is.

Having a blank password is insane.

This shows it is using root:

sudo cat /etc/webmin/miniserv.users
root:x:0

I want to make sure I do not have this issue if I change my production machine to Ubuntu.

I got this work 4 out of the 5 times I tried, now this is going to 6, which was an uninstall, and reinstall, which is not good, plus I ran that forbiden command, which I must agree with.

Should I reinstall Ubuntu?

I know what I did was not right, and I have no idea how to fix it, as reinstalling did not help with the log in, I might be stuck again.

I must point out that I am using the same home drive, and I am wondering if there is something stored on it, that would cause this issue?

If so, how do I purge it?

What do I do if this happens again, meaning I cannot log in using root, and the root password, as I did the other 4 times, so I know this works, I just do not know why it is broken?

Thanks.

Having no password is different than “blank password”. You can’t login with the password set to !, which is what the root password would be on an Ubuntu system that didn’t explicitly have a root password set.

It does not show that. That isn’t showing it is “using” anything. That isn’t a log, it isn’t showing activity.

I still have no idea what the issue is.

Why would you want to reinstall Ubuntu? I can’t see how that has anything to do with the problem we’re talking about.

One problem, I am locked out after installation and cannot get in.
Steps:

  1. I install Ubuntu
  2. Change my home folder in my fstab, to install the virtual servers on.
  3. Update, upgrade, and reboot.
  4. sudo su (sudo also works), installed with: “sh install.sh”, reboot
  5. I cannot log into the virturlmin panel, using my local 192.168.16:10000.

I see the webmin login page as I normally do, but it will not take my root name and password to get in. But it worked two days ago, before the last reinstall.

My attempt at being clear is not working, I am locked out, and have no idea how to fix this the right way, only hacks you say are bad, but you have told me the right way to do it, searching only shows me the wrong ways.

Thanks.

So, you’re not logging in as root. You are logging in as a sudo capable user.

Use that to log in to Webmin. Or, set a root password by switching to root with sudo su - and running passwd and login with root.

This is from a desktop, now I get it, I should ctrl-alt-F3 or something, log into that way, and not the way I did it.

This makes sense, not sure why I was doing it that way, now I wonder why it worked at all, but now that I think about it, I must have logged into a new terminal, instead of sudo su.

Update: It is clear I have not used Ubuntu in years, as you cannot log into root by design, and are forced to use sudo. I did not know that.

Final update: I reinstalling Ubuntu, ran sudo passwd root, and change the password, then did a ctrl-alt-F3 to get a new terminal and logged into it. Install worked fine, and now I can log in.

Thanks, this was driving me crazy.

That’s going over the top you could have opened a terminal and ran sudo -s which would have done exactly what you wanted after adding a root password, but glad you sorted it

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.