From owner-freebsd-stable@freebsd.org Tue Nov 19 13:09:53 2019 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 004E61B23EC for ; Tue, 19 Nov 2019 13:09:53 +0000 (UTC) (envelope-from chris@cretaforce.gr) Received: from relay1.cretaforce.gr (relay1.cretaforce.gr [195.201.253.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.cretaforce.gr", Issuer "RapidSSL RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47HR4b3MPXz4SY5 for ; Tue, 19 Nov 2019 13:09:50 +0000 (UTC) (envelope-from chris@cretaforce.gr) Received: from server1.cretaforce.gr (server1.cretaforce.gr [138.201.248.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.cretaforce.gr", Issuer "RapidSSL RSA CA 2018" (verified OK)) by smtp1.cretaforce.gr (Postfix) with ESMTPS id CBBB51F4D9 for ; Tue, 19 Nov 2019 15:09:46 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cretaforce.gr; s=cretaforce; t=1574168986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ggdpNlf9Wyt6yTEr7LRKXpWI981CPc7duaxXtxYQ1Lg=; b=ghaCULGyg3+9RK/EUxQyWj1R2+Hh14YwcbyX5FA71uM6CoXpy7vy5MF1KNgxkdM6hyH2BY GsG+qZGaxiCgc/EJG17koBAvEOk7ZpEY314olQkPnNFQ51qqmqnv/VJRDJD4ae+MBkfel1 8zDv+LyqO3F67LjPpIEVJCt9InvUGGA= Received: from christoss-air.fritz.box (ppp-94-64-150-254.home.otenet.gr [94.64.150.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: chris@cretaforce.gr) by server1.cretaforce.gr (Postfix) with ESMTPSA id 914B427335 for ; Tue, 19 Nov 2019 15:09:46 +0200 (EET) From: Christos Chatzaras Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) Subject: Re: jexec as user? Date: Tue, 19 Nov 2019 15:09:45 +0200 References: <1237616943.9.1574163726832@localhost> To: freebsd-stable In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3601.0.10) X-Rspamd-Queue-Id: 47HR4b3MPXz4SY5 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cretaforce.gr header.s=cretaforce header.b=ghaCULGy; dmarc=none; spf=pass (mx1.freebsd.org: domain of chris@cretaforce.gr designates 195.201.253.145 as permitted sender) smtp.mailfrom=chris@cretaforce.gr X-Spamd-Result: default: False [-3.14 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:195.201.253.145]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[cretaforce.gr:+]; RCVD_IN_DNSWL_LOW(-0.10)[145.253.201.195.list.dnswl.org : 127.0.5.1]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-1.04)[ipnet: 195.201.0.0/16(-3.56), asn: 24940(-1.65), country: DE(-0.01)]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:24940, ipnet:195.201.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[254.150.64.94.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[cretaforce.gr:s=cretaforce]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; DMARC_NA(0.00)[cretaforce.gr]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_LOW(-1.00)[cretaforce.gr.dwl.dnswl.org : 127.0.5.1]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Nov 2019 13:09:53 -0000 > On 19 Nov 2019, at 15:02, mike tancsa wrote: >=20 > On 11/19/2019 6:42 AM, Ronald Klop wrote: >> Hi, >>=20 >> Is it possible to jexec into a jail as a regular user. Or to enable >> that somewhere? >> Or is the way to do such a thing to set up ssh in the jail? >>=20 > On 11.3 at least, does not the built in functionality of jexec do what > you need ? >=20 > jexec [-l] [-u username | -U username] jail [command ...] >=20 > # jexec -U testuser 3 csh > testuser@cacticonsole:/ % id > uid=3D1005(testuser) gid=3D1005(testuser) groups=3D1005(testuser) > testuser@cacticonsole:/ % >=20 I think he wants to use jexec as a normal user from the main OS. If he wants to run jexec as root and login to jail as user then your = command works.=