If you want to include the current directory as the first thing in your path
search, use:
PATH=.:$PATH

The root account is not set up this way for security reasons. Why? Well,
someone could place a trojan horse shell script, for example, out in the
directories that you commonly cd to. For instance, they might create a
script called 'su'. Can you see where this would lead?

To execute the user's login script after logging in via su, you have to:
su - root

Root's login script is in root's home directory. You can find it by looking
at the last field in the /etc/passwd file for that user (or finger'ing the
user). The file name depends on the shell that's being run (also in the
/etc/passwd file). So for bash, the file will be .bash_profile.


....Paul

-----Original Message-----
From: Tom Taylor [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 06, 1999 2:02 PM
To: Russ Brucks; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [linux] Re: Telnet Admin


From: Tom Taylor <[EMAIL PROTECTED]>

Hi Russ:  My understanding is 'it don't work that way in Linux'.  Linux
always uses the "PATH".  You can get to the current folder by using the
'current location' operator "." - ie: ./reboot if you are in the folder
that contains reboot.

Tom

At 12:28 PM 3/5/99 -0600, you wrote:
>***** NOTES from Russ  Brucks (RUSSB @ KFOC-GRP) at 3/05/99 12:24 PM
>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.
>
>Another question:  how can I change the way su is setting up root's 
>environment?  Sorry to pester with questions, but I'm learning!  Thanks for

>the help!
>
>Russ
>
>FORWARDED MESSAGE from Ray Olszewski (ray @ comarre.com) at 3/05/99 12:21 
>PM
>Probably su is not changing your enviromnent to root's, so reboot isn't in
>the default PATH. Just type the full path to the process, probably
>"/sbin/reboot" (check using the "which" command).
>
>At 11:57 AM 3/5/99 -0600, Russ Brucks wrote:
>>When I Telnet into my box, how can I reboot it from a Telnet session?  I
>>can get superuser like "attributes" by running  su  from the command line,
>>but I get
>>
>>bash:  reboot:  command not found
>
>------------------------------------"Never tell me the odds!"---
>Ray Olszewski                                        -- Han Solo
>762 Garland Drive
>Palo Alto, CA  94303-3603
>650.328.4219 voice                                     [EMAIL PROTECTED]
>----------------------------------------------------------------
>
>-------------.       russb at kfoc.net       ,-.   6733 S Yale
>Russ Brucks   \    ,------------------------'   \  Tulsa, OK 74133-1468
>Kaiser-Francis `--'  rbrucks at earthlink.net    `---------------------
>
>

------------------------------------------------------------------------
New hobbies? New curiosities? New enthusiasms?
http://www.onelist.com
Sign up for a new email list today
------------------------------------------------------------------------
Titanic 12 ... Hindenburg Zeppelin 37 ... Microsoft Windows 98

Reply via email to