From webmin port to SSL 443 on WAN domain name

I’ve made a clean install, and installed Webmin after upgrading all packages.
Now I get the same error as posted here: Webmin does not start: Only Reference pam_unix(webmin:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= r | Virtualmin
I’ve found how out I could my user account into miniserv.users
and did webmin passwd myusername and entered the password.
But after restarting Webmin:
https://termbin.com/2dnkr

You don’t need to do that on a Linux system, and should not do that. Webmin authenticates with system users.

Login with root or any sudo user with ALL privileges (like the first user on an Ubuntu system).

That looks like Webmin is running fine. Looks like you tried to login with a non-existent user or bad password, though.

I followed all this procedure, but it didn’t resolve anything:

I think it’s related with the Github keys from my account, the Ubuntu server did download this time during the install. I didn’t know what it would do when it asked to download these keys from Github.
I presume I will have to start over and decline when this download is prompted to solve this.

Same thing after reinstalling without the download of these keys from my Github account.

What the hell are you talking about? Github? What does github have to do with anything?

This is beginning to feel like a prank, where you’re trying to see how long you can keep me answering increasingly bizarre questions.

I install Webmin from a bash script I made and that worked fine until know.
Here’s the code that installs Webmin:

     5) echo 'Webmin installation';
        wget -O /etc/apt/keyrings/jcameron-key.key https://download.webmin.com/jcameron-key.asc;
        gpg --no-default-keyring --keyring jcameron-key.gpg --import /etc/apt/keyrings/jcameron-key.key
        gpg --no-default-keyring --keyring jcameron-key.gpg --export > tmp.gpg && mv tmp.gpg jcameron-key.gpg;
	mv ./jcameron-key.gpg /etc/apt/trusted.gpg.d/;
	echo 'deb https://download.webmin.com/download/repository sarge contrib' >> /etc/apt/sources.list;
	apt-get update | dialog --progressbox 30 100;
	apt-get install -y apt-transport-https webmin;

I’ve a clean install of Ubuntu server 22.04
I try to install Webmin on it and I get this with the command systemctl status webmin

perl[694]: pam_unix(webmin:auth):authentification failure: logname= uuid=0 euid=0 tty= rhost= user=root

I still have no idea what “github keys” has to do with anything. But, don’t try to explain it. Just don’t follow weird advice on the internet. You should not use changepass.pl unless you are intentionally using Webmin passwords. Most people should not be using Webmin passwords. You should be using system passwords, which presumably you already know…if you were able to login via ssh to install Webmin, obviously know the password for some admin level account.

Do you get a login page when you browse to port 10000 of the system where you installed Webmin? What error do you get when you try to login?

  1. I’ve installed it without the Github thing, so it is not related, because the problem is still occuring.
  2. I do not mismatch my user it’s always the same one and my password is stored with my other private data on a cloud.
  3. When I do ssh localhost -p 10000 I get:
    kex_exchange_identification: Connection closed by remote host
    Connection closed by 127.0.0.1 port 10000

Why are you trying to ssh to Webmin’s port? Webmin is a web app. Visit it with your browser.

I tried from my desktop to access it from Chrome, but it doesn’t show the page

You wanna blame me or help me ?
There so many different things I do not understand yet, and so many versions of explaination where I can’t difine from it’s true enough or not.
Just say. I’ll try alone by the way for so long, it’s that more that will kill me.

I didn’t ask for this issue neihter.

image

My server and my desktop have both a reserved IP on the NAT router.
The server IP is set as DMZ.

I’m trying to help. Approaching heroic levels of trying…50 replies deep and you don’t even have Webmin working yet (though, that’s mostly because you’ve spent most of your time trying to find new and unrelated problems to solve). I’m running out.

I have no idea what that screenshot is of. I need you to keep things simple and stop introducing new problems to solve before you even have Webmin working.

Stick to logging into Webmin with your browser. Do not introduce anything new to the problem. Stop making this so complicated and confusing, I am begging you.

So let’s say, you tell me what you need to debug this and I follow only your steps ?
I’ve got it !

My desktop was still referening to the squid proxy server.
I deleted it and I could get the Webmin page opened in my brower.
But the I get this:

I can tell I’m 100% sure the only password and user I have made.

First, have you done the following things:

Setup software repositories:

curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh
sh setup-repos.sh

Did that succeed? No errors?

OK, then, did you install webmin? This depends on if you are using Debian/Ubuntu or a Red Hat based distro:

Debian/Ubuntu

apt update
apt install webmin

RHEL/Rocky/Alma

dnf install webmin

OK, did that succeed? If so, login to Webmin by browsing to:

https://<webmin-server-ip-address>:10000

Do you get a login page? (You will have to tell your browser to accept the self-signed certificate. Firefox makes this easier than Chrome, but any browser can be convinced to ignore an invalid cert, I’m pretty sure.)

1 Like

Agh. Nevermind, you obviously have Webmin installed. You have a login page!

Is the user you are trying to login as an admin-capable user? Does it have sudo ALL privileges?

You may find it simpler to set a root password and use that, since I’m guessing your user just is not being recognized as a root-capable user by Webmin for some reason, but it’ll always recognize UID 0 as root.

So, set a password (root always exists, it just may not have a password):

sudo su -
passwd

The sudo su - command switches user to root with root’s environment. And, passwd will ask for a new password and ask you to confirm it.

Now login to Webmin with the root user.

I did clean up all of my current install of Webmin and followed your steps.
It did solve the authentification failure.

Hi Joe,

My problem isn’t solved yet, so I’ve followed your advice and have made a Wireguard setup with centralised server. I can ssh into any device of my network, still I can’t link my domain name like I would, but that’s not Webmin’s concern.

My current realted problem based on your advice is that I can connect with SSH on any device, but I can’t use the VPN IP of the distant device:Webmin port when my Wireguard is up.
IP:port doesnt work when wireguard is on.

To start simple let’s take the example of my desktop and server on the same router.
they are now connected with wireguard but I can’t reach the webmin page with the IP’s set for my peers and the webmin port.

Any advice on this ?

I found the solution with for the computer on the same LAN:
iptables -A INPUT -p tcp -m tcp --dport {myport} -j ACCEPT
For the distant computer, this doesn’t seem to be enough.
Do I think I should add the keys of wireguard to all devices that should be able to access Webmin. Is it so?

This sounds like conflicting information. Either you can or cannot communicate between computers over the VPN.

If you can, then Webmin works like any other service; if it is installed and running on the remote computer, you should be able to connect to it from your local computer. If you can’t then you need to figure out what’s wrong with the VPN connection.

Can you ping the remote computer from your computer using the VPN IP of the remote computer? Can you ssh to the VPN IP of the remote computer? If the answer to both of these is “yes”, the answer to “can you login to Webmin?” will also be yes, because Webmin is just another service.

Obviously you have to open the necessary ports, if you have a firewall. If you’ll be using Webmin Servers Index and have Webmin talk to other Webmin servers, you’ll want ports 10000-10100. If just using the GUI, you need 10000.