From owner-freebsd-ports@freebsd.org Sun Dec 31 18:37:12 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3B8DE8B99D for ; Sun, 31 Dec 2017 18:37:12 +0000 (UTC) (envelope-from lists@opsec.eu) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 9073A7DDD1 for ; Sun, 31 Dec 2017 18:37:12 +0000 (UTC) (envelope-from lists@opsec.eu) Received: by mailman.ysv.freebsd.org (Postfix) id 8CD22E8B99C; Sun, 31 Dec 2017 18:37:12 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C0A4E8B99B for ; Sun, 31 Dec 2017 18:37:12 +0000 (UTC) (envelope-from lists@opsec.eu) Received: from home.opsec.eu (home.opsec.eu [IPv6:2001:14f8:200::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50DD57DDD0 for ; Sun, 31 Dec 2017 18:37:12 +0000 (UTC) (envelope-from lists@opsec.eu) Received: from pi by home.opsec.eu with local (Exim 4.89 (FreeBSD)) (envelope-from ) id 1eViTx-000DeG-9a; Sun, 31 Dec 2017 19:37:13 +0100 Date: Sun, 31 Dec 2017 19:37:13 +0100 From: Kurt Jaeger To: Yuri Cc: "ports@freebsd.org" Subject: Re: Any way to make pkg use 'sudo' instead of 'su' to install as root? Message-ID: <20171231183713.GK2827@home.opsec.eu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 18:37:12 -0000 Hi! > 'make install' calls pkg, which does su to change to the root account. > su asks for the root password again and again when there are many > packages to install. > > Is there any way to configure this to be 'sudo'? > > > pkg.conf(5) seems to have no info on this. In Mk/bsd.commands.mk I found SU_CMD, so maybe redefining SU_CMD works ? # Command to run commands as privileged user # Example: "/usr/local/bin/sudo -E sh -c" to use "sudo" instead of "su" SU_CMD?= /usr/bin/su root -c -- pi@opsec.eu +49 171 3101372 3 years to go !