"grep" not working

Dirk Moolman DirkM
Fri May 18 00:14:56 PDT 2007


:-))   thanks.  Even though I don't know everyone on this list, you
really put a smile on my face today  (which is hard these days, with all
the pressure at the office)


-----Original Message-----
From: linux-users-bounces at linux-sxs.org
[mailto:linux-users-bounces at linux-sxs.org] On Behalf Of Ric Moore
Sent: 18 May 2007 12:12 AM
To: Linux tips and tricks
Subject: Re: "grep" not working

On Thu, 2007-05-17 at 14:08 -0500, David Bandel wrote:
> On 5/17/07, Bill Campbell <linux-sxs at celestial.com> wrote:
> > On Thu, May 17, 2007, David Bandel wrote:
> > >On 5/17/07, Net Llama! <netllama at linux-sxs.org> wrote:
> > >> On Thu, 17 May 2007, Bill Campbell wrote:
> > >> > On Thu, May 17, 2007, Net Llama! wrote:
> > >> >> On Thu, 17 May 2007, David Bandel wrote:
> > >> >>> Here's why I personally _never_ allow anyone (especially
root) to have
> > >> >>> "." in the PATH, and any personal directories ($HOME,
$HOME/bin) last.
> > >> >>>
> > >> >>
> > >> >> How do you prevent someone from running "export PATH=$PATH:."
?
> > >> >
> > >> > Linux/Unix is a system for adults, not children, so there's no
> > >> > way to protect people from their own stupidity.  You may be
able
> > >> > to cure ignorance, but you can't fix stupid.
> > >>
> > >> Exactly, which is why I don't understand how David claims thath
he
> > >> prevents it.
> > >
> > >If you read what the original poster found, it was only when he
used
> > >`su -` picking up the users' environment -- the user had no chance
to
> > >enter export PATH=.:$PATH, so it was in the users' rc files.  In
> > >/etc/skel, I link rc files to those in /etc/ which they can't
change.
> >
> > Actually ``su -'' picks up the root login environment.  Omitting
> > the ``-'' keeps the user's environment.
> >
> 
> Ahhhh!  Let me go through this _really_ slow for those who didn't
> reread the original post solution.
> 
> The guy went in as root and all worked.  He then ran `su - $USER`
> (whoever that user is) and nothing worked because he picked up the
> users' environment (what the '-' does).  He exited and run only `su
> $USER` _not_ picking up the user's environment and it worked.  That
> gave him the clue that something in the users' environment (like the
> PATH variable) was hosed since he picked it up the first time, and
> didn't the second time.
> 
> And yes, if you don't put a $USER after the su (with or without the
> '-') root is assumed.
> 
> Is that better?  Jeez I hate all this unnecessary typing.  Someone
> must think my name is Ric.

Hey! I wuz just minding my own business and enjoying the thread when
someone mentioned my name. At least you took a pointer from me and
posted in plain English instead of "geek-speek". You getting MUCH better
Meester Bandel. Heck, I understood what you provided. That's a plus!
<giggles> Ric
 
-- 

_______________________________________________
Linux-users mailing list ( Linux-users at linux-sxs.org )
Unsub/Password/Etc:
http://mail.linux-sxs.org/cgi-bin/mailman/listinfo/linux-users

***  OFF TOPIC conversations should get sent to general at linux-sxs.org.
This rule will be strictly enforced.  ***

Need to chat further on this subject? Check out #linux-users on
irc.linux-sxs.org !


Disclaimer: http://196.33.167.70/disclaimer





More information about the Linux-users mailing list