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.
-----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
--
Jon H. LaBadie [email protected]
11226 South Shore Rd. (703) 787-0688 (H)
Reston, VA 20190 (703) 935-6720 (C)