On Friday, February 06, 2015 03:08:42 PM you wrote: > Amcheck is a compiled binary, not a script. > > With bash, if the path to a script's interpreter is invalid, it says so > with > > -bash: ./jj: /bash: bad interpreter: No such file or directory > > But if it can't find the command you asked for, you get: > > -bash: ./jjj: No such file or directory > > This is why I specify either 'sudo -i' or 'bash -l' when launching a > shell under a new name. The parameters tell sudo and/or the shell to > launch a full 'login' shell, which ensures your PATH is set properly. > If you omit that, it tends to simply use the existing PATH you had in > your original shell. > Doing an su amanda -c "echo $PATH" shows the first 3 colon separated paths as all /usr/local/sbin where amcheck is installed.
This is the amanda $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin and because I've been playing, root now has 3 copies of that first path. But it can't find it. Owned by root:amanda on both the old drive and the new one. And I'm walking around with half a cold cuppa, shaking my head. > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Jon LaBadie Sent: > Friday, February 6, 2015 13:50 > To: [email protected] > Subject: Re: An odd problem... > > On Fri, Feb 06, 2015 at 12:11:23PM -0500, Gene Heskett wrote: > > Greetings all; > > ... > > > then: > > su amanda -c "amcheck Daily" > > root@coyote:/home/amanda# su amanda -c "amcheck Daily" > > su: Authentication failure > > (Ignored) > > sh: 1: amcheck: not found > > > > But amcheck is sitting in /usr/local/sbin. And its in the $PATH. > > Is amcheck a script, possibly perl or shell. If so, check the first line > which specifies the interpreter. Something like: > > #!/bin/perl > > If it specifies the wrong location the shell reports "not found" just > like it would for the script not found. > > Wish they would change that message. > > Jon Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) Genes Web page <http://geneslinuxbox.net:6309/gene> US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS
