Solved Jail: run program as other user then root

Hello,

I have a question of understanding. If I jexec a jail from my host I'm logged in as root. Is there a command (equal to sudo) to run a command as other user (e.g. www)? At the moment I'm changing the user first ( su www). Is there another way?

Thanks!
 
Another way is to use the -U option:
Code:
     -U username
             The user name from jailed environment as whom the command should
             run.
From jexec(8).
 
Another way is to use the -U option [...] from jexec(8).
Thanks. I never used jexec() like this before . For executing a command from outside the jail as user www I now use: sudo jexec -U www jailname command

From inside the jail (similar to sudo) I use: su -m www -c 'command'

You make my day!
 
The jail(8) man page now states that both -u and -U are deprecated and you should use the exec.jail_user and exec.system_jail_user parameters.

Sorry to dig up an old thread, but Google brings you here.
 
Back
Top