# Run "nice" outside a Jail



## luizxavierct (Jul 12, 2012)

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


----------



## francis (Jul 12, 2012)

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]_(...)".


----------

