Virtualmin not creating webmin users.


I have accidentally deleted the passwd file on my system and after I have restored it, the virtualmin no longer creates webmin users when I add new account. I am able to create a webmin user manually from the webmin interface, but I have to do it for every new account. Also when I click on validate virtual servers I get the following output:

Home directory : Home directory /usr/home/username is owned by username instead of username

I would be very grateful if someone tell me how can I resolve this issue.

I have to say I’ve never run into a situation like this before (most folks consider it a bad idea to delete /etc/passwd, so it doesn’t happen very often), so I’m kinda guessing. :wink:

The home directory ownership error is probably a mismatch between UIDs and or GIDs. You can use the -n option to ls to get the actual UID/GID numbers and you can compare them to what’s in passwd and group.


ls -ln /home

Since passwd is what was broken, that’s what you’ll need to change to match actual ownership.

As for the no Webmin account thing…that’s weird. Has Webmin been restarted since you restored /etc/passwd?

Hello Joe,

I have made a chown on all of the folders after I have recreated the users by hand and the apache and everything else works fine. Could you please tell me if the virtualmin stores information somewhere regarding the users and where I can find this information, because I think if there is such thing, it causes me the problems.

As for the restart, yes I have restarted the webmin, but to no avail.

Yes, Virtualmin does have meta-data in /etc/webmin/virtual-server.

I’m thinking there must have been something other than merely deletion of /etc/passwd that led to this behavior. But, you may also want to run a configuration re-check just in case Virtualmin happens to cache information about the location of user data (this seems unlikely…).

Basically what happened is that on my freebsd machine while using sysinstall, instead of downloading of src/base, I have downloaded the base package, which overwrites everything in the etc folder. The configuration of webmin and virtualmin have stayed intact, because it is in the /usr/local/etc folder. I have recovered the passwd file manually and everything have recovered. The only issue that currently occurs is that when I create new virtualmin account, it doesn’t create a webmin account. It creates unix account though.
Could you please tell me what is the module which is responsible for the creation of the webmin users ?

I’ve asked Jamie to have a look at this thread, as I’m completely lost. :wink:

BTW-the module that manages Webmin users is "Webmin Users", of course.

When you say it doesn’t create a Webmin account, what goes wrong exactly? Does some error appear at the ‘Creating Webmin user…’ step? Or does that step not appear at all during the domain creation? Or does it say a user has been created, but it isn’t showing up in the Webmin Users module?

Also, on the ‘Create Virtual Server’ page in the ‘Enabled features’ section, do you have ‘Create Webmin login?’ checked?


I have double checked and the feature in the virtualmin is enabled. And when I create new account here is the output for the Webmin user.

Creating Webmin user …
… done

However, when I go to Webmin -> Webmin Users I don’t see the new user listed and I am not able to login with it in https://ip.address:10000. But I am able to login in the usermin section which is on port 20000. I am able to create the webmin user manually, by clicking on Create new Webmin user and bypassing the warning. Also, when I use Validate Virtual Servers, the following output shows for the new user
Webmin login : Webmin user test does not exist

Thank you.

I did find a bug that could potentially cause this - check in your /etc/webmin/miniserv.users file for a user with a blank name. It would have a line that starts with a : , following by the encrypted password and other fields.
If you see this, delete that line and re-try the domain creation.

Jamie you are the Man :). You have solved a 1 month mystery. Thank you very much for your help and keep up the good work.

Cheers :).

No probs … and thanks for finding this bug!