How use API to change shell

I know about the “chsh” command, but I have updated my “Custom Shells” and would like to run Virtualmin API scripts to change all of the domain owners to a new shell.

Is this possible?

Oops, I should remember to thoroughly read the docs… I am able to use a shell script to mass change the default shell for users, e.g.:

chsh -s /usr/bin/scponly domainowner01

chsh -s /usr/bin/scponly domainowner02

chsh -s /usr/bin/scponly domainowner89

chsh -s /usr/bin/scponly domainowner90

Thx!!!

Howdy,

You could use the Virtualmin command line to generate a list of Virtual Server owners… you could then loop over that list of users, and use that chsh command.

A command such as this will show you all the Virtual Server owners:

virtualmin list-domains --user-only | uniq