How to enable jailshell through API?
I tried to find an answer in documentation for an hour and now my head is boiling.
How can I enable / disable jailshell for a single user through API? - I don't want to change a packages, I just need to be able to enable/disable jailshell (not full shell).
Thanks.
-
Use modifyacct's "shell" parameter to set the shell for the account:
https://api.docs.cpanel.net/openapi/whm/operation/modifyacct/
In this case you'll want the full path to jailshell, which, if I recall correctly, is
/usr/local/cpanel/bin/jailshell
1 -
Small update, if it matters for others.
suggested function can be used to enable/disable shell. But you can not choose between jail or normal shell. If you want to use jailshell - you much set "Use cPanel® jailshell by default" to "ON" in Tweak Settings. Only then this function will actually set jailshell.
0
Please sign in to leave a comment.
Comments
2 comments