On Fri, Feb 06, 2015 at 16:09:08 -0500, Gene Heskett wrote:
> Doing an su amanda -c "echo $PATH"
> shows the first 3 colon separated paths as all /usr/local/sbin where amcheck
> is installed.
Note that if you do this (with double quotes), the value of $PATH will
be expanded by your interactive shell before the su command is processed,
rather than inside the spawned subshell.
Try
su amanda -c 'id; echo PATH=$PATH; echo HOME=$HOME; echo USER=$USER'
and see if that tells you anything interesting. (The single quotes
should prevent expension of the variables at command-input time, leaving
them to be expanded in the subshell.)
Also, what does "ls -l /usr/local/sbin/amcheck" show?
Finally, does
su amanda -c "/usr/local/sbin/amcheck Daily"
work?
Nathan
----------------------------------------------------------------------------
Nathan Stratton Treadway - [email protected] - Mid-Atlantic region
Ray Ontko & Co. - Software consulting services - http://www.ontko.com/
GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt ID: 1023D/ECFB6239
Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239