It would avoid confusion if the "man 8 jexec" clearly stated that the base host's environment was used in the jailed system, For example: The intent of what is "desired" in the jail is demonstrated in the path. # jexec -u root b2 printenv |grep PATH PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin # jexec -U root b2 printenv | grep PATH PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/sbin:/bin:/usr/sbin Suggestion: Change -u username The user name from host environment as whom the command should run. to -u username The user name from host environment as whom the command should run. This is the default.
A commit references this bug: Author: bcr Date: Sat Apr 23 22:31:59 UTC 2016 New revision: 298524 URL: https://svnweb.freebsd.org/changeset/base/298524 Log: Define which of the username options (-u/-U) to jexec(8) is the default. Bump Dd. PR: 207587 Submitted by: dewayne@heuristicsystems.com.au MFC after: 3 days Sponsored by: Essen Hackathon 2016 Changes: head/usr.sbin/jexec/jexec.8
A commit references this bug: Author: bcr Date: Wed Apr 27 16:23:16 UTC 2016 New revision: 298706 URL: https://svnweb.freebsd.org/changeset/base/298706 Log: MFC r298524: Define which of the username options (-u/-U) to jexec(8) is the default. Bump Dd. PR: 207587 Submitted by: dewayne@heuristicsystems.com.au Sponsored by: Essen Hackathon 2016 Changes: _U stable/10/ stable/10/usr.sbin/jexec/jexec.8
Patch committed, MFC done. Thanks for sending in the PR. Closed!