Can usermin assume @-the-domain-from-the-URL at :20000 for the logins?

If I send my users to mail.their-domain.com:20000

For webmail purposes. Can Usermin cull their-domain.com from the URL and assume it in their login so that they can just type “username” in that box?

Is there another way that I can do the same thing by setting something per domain manually? (For example roundcube has a “$config[‘username_domain’] = ‘their-domain.com’;” in /public-/config which assumes a domain that you can set in a roundcube site’s config file.)

Thanks for any ideas.

SYSTEM INFORMATION
OS type and version Ubuntu 24.04.1
Virtualmin version 7.20.2

What is wrong with theirdom.com:20000 or if you have a default virtualmin install webmail.theirdomain.com ?

Sorry I see that I did not word that very well. I will correct the original as well. I mean “in their login” so that they can just type “joe” and not “joe@their-domain.com”.

Yes, that’s the default behavior on a Virtualmin system.

I get this:

But it lets me right in with rontest@testdomain.org

How might I have borked that? (And will it, or can it, strip “mail.” from the url so that mail.testdomain.org assumes only @testdomain.org?)

Thanks.

Hmm I didn’t realise the usermin could differently select users via their name before the @ symbol. So you can login using joe rather than joe@thisdomain.tld assuming you are connected to that domain via the url e.g thisdomain.tld:20000 I assumed that the full username would have to be entered

Does it actually work in your case? My test setup which is pretty-close to default, but is not default, does not.

You mean strip mail from the username and not the url ? Now confused url would be the address you enter into the browser and the username is what you type into the login form when the browser has navigated to the login form which is it ?

That’s really a second, separate question I think.

The main starting point is knowing if I go to: http://the-domain.com:20000

How can I login as just: the-username (as opposed to the-username@the-domain.com which mine requires now).

@Joe says that the the default behavior is for virtualmin to grab the domain from the url and so login as just: the-username(@secretly-assumed-domain-from-URL-entered.com)

Mine is not doing that now. Is yours?

My second question is whether it is supposed to cull just the-domain.com from “webmail.the-domain.com” or “mail.the-domain.com” (etc) when it does (or how to do that) and login as just the-username(@secretly-stripping-to-only-the-domain-and-ignoring-webmail.or.mail)… that’s a further problem since the thing that @Joe says is the default behavior is not happening for me.

I can install another ubuntu and try an out-of-the-box install, but the one I am looking at I installed yesterday so its customizations are pretty minimal. I figured if it does not work for you either then that would be confirmation enough that it is probably not the default and @Joe too is confused by my awkward writing today.

The default if you installed using the Virtualmin installation process and there were no errors during installation. If you installed manually, you wouldn’t have gotten that configuration change, or if you ever removed Usermin and reinstalled it, that configuration would have been removed.

Pretty sure this is where that happens during the virtualmin-config stage of the install: Virtualmin-Config/lib/Virtualmin/Config/Plugin/Usermin.pm at 483771c763999ab6004893a9e52a070ee648e8ed · virtualmin/Virtualmin-Config · GitHub

Looks like domainuser and domainstrip are the related options. Which you can find in Webmin under Usermin Configuration->Authentication near the bottom.

Both options kind of maximizes the possibility that a username will work (with domain name or without domain name). I don’t think any other options or configuration is needed, assuming things are configured in Virtualmin in the usual way.

Hmm, yeah, that’s the setting I have but that’s not the behavior on https://just-the-domain.com:20000 using just the username. (I suppose that it may be worth noting that they user’s usernames actually are something@the-domain.com in the password file, but I assume you know that.)

I’ll try installing one straight out of the box and change nothing and see if I can duplicate this or if I get the expected behavior.

By the way, is there somewhere to check these failed logins? I looked in /var/log/auth.log and I do see some from my user from earlier but me re-running the test does not seem to generate similar logs (so those might be from something else). I just thought that the log might have given me a hint.

Also my got locked out for failures in testing this. Happen know how long that lasts?

Thanks.

I have now repeated this with a purpose-made out-of-the-box install (on Ubuntu 24.04).

I took screenshots of every step of my configuration (in case any of the choices matter).

I also took screenshots of creating the virtual machine and user but I’ll spare you most of those. I also repeated the login test on Edge (photo is Opera).

If you are right that my first test (just ron) was supposed to work, and I am right that it is broken out of the box, does that imply that I need do nothing and the team at Virtualmin/Usermin will figure this out and issue an update?

Thanks.

Ron

Screenshot 2024-10-18 at 11.53.16 AM














Screenshot 2024-10-18 at 11.55.12 AM
Screenshot 2024-10-18 at 11.56.35 AM



Screenshot 2024-10-18 at 11.59.34 AM

For the record I downloaded the latest Ubuntu iso today (24.04.1 LTS), followed the same install steps and got the same result regarding not Virtualmin not automatically inserting the URL’s domain into my :20000 login. (Logging in on :20000 with the domain added worked fine.)

Defaults:
image

My experience is that you can use the unsername only as long as that username doesn’t exist in any other domain on that VMin server.

I doubt this is the solution but just an observation, on my GPL servers I hit the same problem as you do, however on my PRO server it works as expected. The only other difference is the GPL servers are using Ubuntu 24.04.1 and the PRO server is using Ubuntu 22.04.5 which again I don’t think is the issue

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