Individual answers below.
At 12:28 PM 3/5/99 -0600, Russ Brucks wrote [abridged]:
>Yes that works fine... Thanks... Question is, why when I cd to /sbin and
>ran reboot from the cmdl, did it still report bash: reboot: etc.etc..??
>Perhaps because I'm so nu to Linux/Unix I'm not understanding the ways the
>PATH works... I figure it would start in the current directory, then if
>the command is not found there, it would search each dir in the PATH. That
>is how I am familiar with PATH.
You figure wrong. When looking for a command, bash checks the pwd only if it
is in the PATH env variable (as .). Otherwise, you have to type ./command
instead of command to get bash to run something from the pwd. And bash
ALWAYS follows the PATH order, whatever it is -- this is why you want to use
"which" if you're having unexpected results, to see where the copy of the
command that bash actually runs is located.
BTW, to check your environment, just type "env" at the command line, and
you'll get a listing to stdout of all settings currently in effect.
And don't be tempted to add "." to root's PATH; it presents a serious
security hole. Most people say it never should be done. At the least, it
shouldn't be done unless you completely understand the implications and are
ready to deal with them (something no beginner is).
>Another question: how can I change the way su is setting up root's
>environment?
Run "su -" instead of "su". "man su" for details.
------------------------------------"Never tell me the odds!"---
Ray Olszewski -- Han Solo
762 Garland Drive
Palo Alto, CA 94303-3603
650.328.4219 voice [EMAIL PROTECTED]
----------------------------------------------------------------