Run "nice" outside a Jail

I have a FreeBSD server with jails, I need to run the nice(1) command to run one script with low priority, this script is running in a jail, but I can't run the nice(1) command inside a jail (even as root), I can run only outside a jail and with root user.

How can I run this command in a jail?



Thanks
 
Hi luizxavierct! Please check jexec(8) command, which allows to execute a command inside an existing jail. As You can see jexec executes commands inside jail; (...) identified by its jid or name. So what it is jid? It is the unique jail identifier, which You can get using jls(8) utility. There is also sysutils/jailme utils - A setuid version of jexec to allow normal users access to jails.

Best regards!

added note~ Oh, one more thing! I forgot to mention about Security Concerns if You decide to use jailme. More info about this issue can be found on Bill Moran website; collaborativefusion.com. General idea is that - if You have a user on host system and (...) accidentally create a user within a jail that had the same username and UID as the host system user (...) then it may prove to be security breach. But on the other hand Mr Bill Moran wrote: "[font="Verdana"]I don't believe the risk of such a thing happening is very high [/font](...)".
 
Back
Top