Custom Commands Cloned to new module under new Category, How to migrate that to Usermin?


RHEL 6 & 7
Webmin Ver 1.974
Usermin 1.823

First thanks for your wonderful product.
I have custom commands module that’s been cloned to a new module name and assigned to a new Category. Now I’m trying to move a lot of users to usermin to limit their access. I have poked around in the interface and don’t see a clear way to move a “cloned” custom command module now under a different name over to usermin. Any insight would be greatly appreciated.

I’m not entirely sure I understand what you’ve done, but it sounds like maybe you’ve cloned the Webmin Custom Commands module.

Usermin users never have access to Webmin modules. They are wholly independent (though Usermin is managed in Webmin, since Usermin users don’t have the necessary privileges to change configs for the whole server).

So, if you want a clone of the Usermin Custom Commands module, you need to clone it in Webmin->Webmin->Usermin Configuration->Usermin Modules.

And, you can set the category when you clone it.

Yes, thank you for clarifying. I have webmin custom command modules. They have been cloned and renamed to different module names under a Custom category. I want to re-create said custom commands over to Usermin. In order to do so, I suspect I have to re-create them within the native custom command module? Then click the radio button making them available to Usermin? is that the only way?

Hmm…actually, I’m not sure, now that you mention it. I don’t know how that module being cloned in Usermin works in terms of using jobs defined in Webmin and then delegated in Usermin.

But, why do you need a clone, if you’re not already using custom commands in Usermin? Just use the Usermin Custom Commands module (not a clone of it).

So somebody cloned the custom commands module to a different name and under a custom category within webmin. They called the new module “Build and Deploy”. They placed that cloned module in a custom category. Then they built out said custom commands within the (cloned) custom commands module (Build and Deploy).
In usermin, that cloned custom commands module isn’t even available. Nor is that custom category. The only way I can think of to get said custom command visible to Usermin is to re-create each custom command “painstakingly” into the native webmin custom commands module, and then click the radio button to allow them to be available in usermin. I hope that made sense. Would that be the only way?

You don’t need to remake any of the custom commands. Clicking the “available in Usermin” option on the existing jobs should make them available in Usermin.

That said, I honestly have no idea how a cloned Custom Commands module works, in terms of using Webmin commands. But, I would assume you can configure the cloned module to have the custom commands you want it to have for the users you want to have it (once they’ve had “available in Usermin” checked) in the Usermin Module Configuration->Your Cloned Module Name settings.

Joe, in the end, I found that custom categories don’t move over to usermin easily, but if a person goes to the actual files residing within the custom categorie’s folders they’re just labeled as custom2 custom3 etc… I just did a cp -a *.html and *.cmd over to the native custom command directory. I numbered each custom command sequentially incrementing by ‘5’ with each new number and when I copied them over I subsequently clicked the radio button as you you had stated ( I already knew about that ), and then they all show up in usermin in order.

1 Like

I’d like to add to this. I found something today while tinkering with this more.
So my company sets up custom Modules and puts custom commands under the the custom module names. I found that all the usermin custom commands are is a config file pointing back to webmin custom commands folders in /etc/webmin for example “/etc/webmin/custom8” and all the .html and .cmd files mentioned above reside. You can manually modify that config file to point to any of the webmin folders that you want. As long as the custom commands configured within are enabled to show up in usermin, they will be there in usermin as soon as you create them in webmin.
Problem solved. Thanks.

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