Update Custom Shell Via Command

I have written a bash install script for newly deployed VPS servers. The script configures Virtualmin based on my requirements.

I’m having trouble working out how I can change the “Custom Shells” to default to /bin/bash instead of /bin/sh, for all future users, via the command line. I’m able to list them with the following command “virtualmin list-available-shells” but have not been able to work out how to change the default shell. Does anyone know how this can be done using the virtualmin commands? Or how it can be done using command in another way?

I’m running Virtualmin 4.02.gpl with Nginx plugins v1.4


Yeah I’m not aware of a way to change the custom shells using the command line tools.

However, the file “/etc/webmin/virtual-server/custom-shells” appears to contain all the custom shell data… I haven’t tested this, but I believe you could simply copy that custom-shells file from one installation to another. You’d need to restart Webmin after copying that to an installation, but once you do that, that should do what you’re after.

Let us know if that does what you’re after!


Worked perfectly! No need to restart Webmin either. I’d still be interested in seeing if there was a command for updating these value as using a formatted file like this doesn’t seem too maintainable.

Thanks Eric.