Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Dec 2017 19:37:13 +0100
From:      Kurt Jaeger <lists@opsec.eu>
To:        Yuri <yuri@rawbw.com>
Cc:        "ports@freebsd.org" <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>
In-Reply-To: <c92eb994-1b9b-57ab-cc19-9ae2b28e6cc9@rawbw.com>
References:  <c92eb994-1b9b-57ab-cc19-9ae2b28e6cc9@rawbw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 !



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171231183713.GK2827>