gksudo 16.10

Karl Auer kauer at biplane.com.au
Sun Nov 6 12:01:03 UTC 2016


On Sun, 2016-11-06 at 12:05 +0100, Ralf Mardorf wrote:
> [root at archlinux ~]# sudo -u rocketmouse echo $HOME
> /root

When you use a variable on the command line it is expanded before the
command line is executed. So the above command is the equivalent of:

   sudo -u rocketmouse echo "/root"

> [root at archlinux ~]# sudo -u rocketmouse HOME=/home/rocketmouse echo
> $HOME 

Again, $HOME is expanded before the assignment is made, so that command
is the equivalent of:

   sudo -u rocketmouse HOME=/home/rocketmouse echo "/root"

So you will need to rethink many of those tests...

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B
Old fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4







More information about the ubuntu-users mailing list