Disable environment settings

VirginSnow at vfemail.net VirginSnow at vfemail.net
Tue Jun 3 13:38:34 EDT 2008


> Date: Tue, 3 Jun 2008 12:36:08 -0400
> From: "Kenny Lussier" <klussier at gmail.com>
> Cc: GNHLUG <gnhlug-discuss at mail.gnhlug.org>

> cover all of the odd cases that we seem to be running into. I like sudo.
> Unfortunately, people get tired of typing it when they need to run 100+
> commands as another user to diagnose a problem. The option that they have

cat > /usr/local/bin/do-as-other-user.sh << "EOF"
COMMANDS="ln df ls fdisk foo bar" # list your commands here
for COMMAND in $COMMANDS; do
 BIN=`which $COMMAND` && alias $COMMAND="sudo $BIN"
done
EOF

then . /usr/loca/bin/do-as-other-user.sh

Would that work?


More information about the gnhlug-discuss mailing list