There is an option in whm/cpanel to enable jailshell access for any hosting account.
I want to know if it is possible to enable that option for any or all cpanel hosting accounts through command line.
Jailshell can be enabled for a user in WHM by navigating to Manage Shell Access under Account Functions.
To setup jailshell access for a user from the command line interface, simply use the operating system's change shell command as root, for example:
You may also be interested in these sections of cPanel's documentation:
Suppose your username is
If you want to change the shell without using the variable, it would look like this:
If you typed
You also said that you're getting this error:
That is caused because the root account has been set to use jailshell, though it should not be. This could have happened when you executed the above command without passing the parameter for the user account (i.e. by using an unset variable).
You may wish to reset your shell to