[kw-pm] Perl CGIs, modules and Apache.

Andrew Kohlsmith akohlsmith-pm at benshaw.com
Sat Apr 3 09:27:47 CST 2004


> Actually, this is not true.  At least, it's not for OSX.  Well, it's sort
> of true, I suppose, but in addition to changing to the new user's
> environment variables, it also changes the user's shell.  /usr/bin/false
> will exit immediately, and thus kick me right back out again.

use "su user", not "su - user", as the latter actually tries to log in instead 
of just change the uid.  Also use "env -" -- it will do what you desire, I 
think, if what you're out to do is wipe out your environment variables and 
start anew.  

I do something similar for my WINE user:

env - HOME=/home/wine \
      TERM=ansi-mini \
      PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/scripts \
      QTDIR='D:\Qt\3.1.2' \
      QMAKESPEC='win32-msvc' \
      MSDevDir='\MSDev98' \
      INCLUDE='d:\vs\vc98\include;d:\openssl\include;d:\psi-cvs\qca\src' \
      LIB='d:\vs\vc98\lib;d:\openssl\lib;d:\psi-cvs\qca' \
      LIBPATH='d:\vs\vc98\lib;d:\openssl\lib;d:\psi-cvs\qca' \
      wine --debugmsg -all,+err -- $*

Regards,
Andrew



More information about the kw-pm mailing list