Re: help adding start and shutdown script



"Matth?us Banach" <accounts@xxxxxxxxxxx> wrote in message
news:e08b1r$8mv$1@xxxxxxxxxxxxxxxxxx

If you want Linux to look into the current directory for executables,
just set the PATH variable. In bash you have to edit ~/.bash_profile.

If you add

PATH=$PATH:. # sets the PATH variable to the value it had
# before PLUS ".", the current directory
export PATH # exports the variable

Don't do this...

Part of your security comes from the fact that all commands come from
known places in the filesystem, regardless of where you might currently
be sat. So if you were to pick up something nasty, it could not be
executed accidentally unless it manages to get into a directory on
$PATH; as these are often only writable by root, there's a strong chance
that won't happen.

As soon as you put "." on your path, the commands you type can be
overridden by malware, and strange and wonderful things can result
(although they're unlikely to be pleasant things).

If you want your script to be in path, put it in path. Don't bend path
to meet your script. Copy it into, for example, /usr/local/bin/ and be
done with it.

HTH

Vic.


--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
.



Relevant Pages

  • Re: PC--What is it good for?
    ... So every time you edit a document, you need to do one of the few exact same ... before you can even start figuring out what commands are involved. ... exact same combinations of things" over and over. ... stream of phonemes. ...
    (rec.arts.sf.written)
  • Getting started with apt (was: mozilla)
    ... You *will* have to edit some source files on your system. ... repo lists that are on an Internet site. ... downloading my own copies of the mirror lists and deleting the primary ... restrict certain commands to certain groups. ...
    (Fedora)
  • Re: MC Alternative? (File Managers)
    ... >> almost every personal computer in existence and are considered ... >> stripped down file manager for the console. ... > combination of programmable F# keys (through bash) and bash ... > by your shell (there are no built-in commands). ...
    (comp.os.linux.misc)
  • Re: MC Alternative? (File Managers)
    ... >> almost every personal computer in existence and are considered ... >> stripped down file manager for the console. ... > combination of programmable F# keys (through bash) and bash ... > by your shell (there are no built-in commands). ...
    (comp.unix.questions)
  • Re: why wont my awk if/else work for both conditions?
    ... output1.txt; then echo y; else echo n; fi ... bash - but then stops. ... commands executed while in sh. ... but only when i type it directly into the prompt - not ...
    (comp.unix.shell)