pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: "best" way to auto-enter root's password to install packages



Please have a look at the pkgsrc Guide for one solution that only changes 
to root when needed.

9.12. Using 'sudo' with pkgsrc

When installing packages as non-root user and using the just-in-time su(1) 
feature of pkgsrc, it can become annoying to type in the root password for 
each required package installed. To avoid this, the sudo package can be 
used, which does password caching over a limited time. To use it, install 
sudo (either as binary package or from security/sudo) and then put the 
following into your mk.conf, somewhere after the definition of the 
LOCALBASE variable:

.if exists(${LOCALBASE}/bin/sudo)
SU_CMD=        ${LOCALBASE}/bin/sudo /bin/sh -c
.endif


Home | Main Index | Thread Index | Old Index