Submitted by hescominsoon on Sun, 06/24/2018 - 19:49 Pro Licensee
My primary account says: Has shell /sbin/jk_chrootsh. How do i enable this for all of the other virtual hosting clients on the server?
Status:
Active
My primary account says: Has shell /sbin/jk_chrootsh. How do i enable this for all of the other virtual hosting clients on the server?
Comments
Submitted by andreychek on Sun, 06/24/2018 - 23:06 Comment #1
Howdy -- it sounds like you are saying the jailkit package is installed, and if you Re-Run the Virtualmin Config Check, that it says "Chroot jails are available on this system".
If that's the case, you can enable chroot jails for the users on your system by going into Administrative Options -> Edit Owner Limits -> Other Restrictions, and there, set "Chroot jail domain Unix user?" to "Yes".
Submitted by hescominsoon on Sun, 06/24/2018 - 23:22 Pro Licensee Comment #2
is there a shell command i can use to apply this to all accounts at once?
Submitted by JamieCameron on Mon, 06/25/2018 - 21:26 Comment #3
You can use the API command
virtualmin modify-domain --domain example.com --enable-jail
Submitted by hescominsoon on Tue, 06/26/2018 - 08:37 Pro Licensee Comment #4
That is still one at a time though right?
Submitted by andreychek on Tue, 06/26/2018 - 09:06 Comment #5
You would need to create a simple script that uses the Virtualmin command line to loop over all the domains on your server to enable that option.
A few examples of that can be seen here:
https://www.virtualmin.com/documentation/developer/cli_examples
The loop example in the section "Reset passwords for all Virtual Server owners" should do what you're after.