NetBSD-Users archive

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

Re: Switching user and environment variables to root to install packages

On Wed, Jul 02, 2014 at 09:14:17AM +0200, Rocky Hotas wrote:
> Hi everybody!
> In order to install new pagkages with pkgsrc it is necessary to set the 
> environment variables PATH and PKG_PATH.
> This can be done for root, which have the needed permissions to install new 
> packages.
> With a common user and the command su it can be still possible to have the 
> necessary permissions, but the variable PATH and PKG_PATH are not set.
> So, I would like to ask two question:
> - which is in such cases the best approach? To set PATH and PKG_PATH in 
> /etc/profile for all users or to mantain the actual configuration?
> - Is there a way to completely switch the user and its environment variables?
> Thanks!

Try 'su -'
The '-' should inherit the environment.

"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the 
oppressing." --- Malcolm X

Home | Main Index | Thread Index | Old Index