"grep" not working

David Bandel david.bandel
Thu May 17 07:42:06 PDT 2007


On 5/17/07, Dirk Moolman <DirkM at agilitytech.co.za> wrote:
> Ok, I found the problem.   David was on the right track, regarding the
> binary which could be different.
>
> I found this out another way, by printing out root's profile, and the
> user's profile, and sitting and comparing the 2 profiles.   I first
> thought this might be related to the locale or language settings, but it
> wasn't.
>
> I then got desperate, and changed her PATH settings, and viola, it
> worked. I then ran a find, to look for another file with the name grep.
> Interesting enough, the which & type commands, showed the correct binary
> (in /usr/bin), but the find command showed me another file, sitting in
> the directory she was working in.
>
> What I think probably happened, is that, because she has command line
> access, she accidentally created a file called grep (with 0 bytes), and
> from there on, she was executing her own "grep" file, which ran
> successfully (there was nothing in the file to make it crash)

Here's why I personally _never_ allow anyone (especially root) to have
"." in the PATH, and any personal directories ($HOME, $HOME/bin) last.


>
> This kept me busy long enough - took me a whole day to figure out what
> the cause of this was.

I can believe it.

Ciao,

David A. Bandel
-- 
Focus on the dream, not the competition.
            - Nemesis Air Racing Team motto



More information about the Linux-users mailing list