Failed to save user : The username logs is reserved for use by Virtualmin (logs)

Is “logs” still needed by Virtualmin? I have someone who wants “logs@their-domain.com” and I don’t actually see such a user in the password file.

Thanks.

SYSTEM INFORMATION
OS type and version Ubuntu 24.04
Virtualmin version 7.50

You can create a alias with that name as a workaround.

I can’t even find where that restriction is imposed. I found the language for it, but the variable name doesn’t appear in any code!

I’ll have to ask @Jamie what this is about, as I can’t figure out why we’d reserve a username.

Is there any way that I could shim it in? Like create “logs2” and then update the password file and maybe something else?

Maybe? Virtualmin usually does figure things out based on the actual reality of config files, so in most cases, you can alter things without having to update its metadata. Users that are “owned by” a domain get that way by sharing a group with the domain. But, it’s possible there’s also some Virtualmin metadata about that user that would thwart your plan.

We added that username restriction originally to prevent a potential collision between the home directory and standard Virtualmin domain sub-directories. The check is hard coded here : virtualmin-gpl/virtual-server-lib-funcs.pl at master · virtualmin/virtualmin-gpl · GitHub

But, a user named logs wouldn’t conflict with a directory /home/domain/logs, because the user would live in /home/domain/homes/logs. Right?

1 Like

Thank you, with this I was able to change the line:

if ($name eq "domains" || $name eq "logs" || $name eq $home_virtualmin_backup) {

to:

if ($name eq "domains" || $name eq "logz" || $name eq $home_virtualmin_backup) {

in:

/usr/share/webmin/virtual-server/virtual-server-lib-funcs.pl

and:

systemctl restart webmin

And it created rightly.

(And then I changed the line back, just in case, since this was a one-off for one guy.)

Ron

1 Like

That’s a good point! I actually cannot see any reason for this check, so I think we can drop it.

1 Like

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