Questions on shell execution

Hi,
I have a question regarding Korn shell script execution in HP-UX 11.11.

What sort of environmental settings do I need to run a Korn shell script such as below without entering "./" at the begining of the command?

cat test.ksh
date

I am able to do this with a user called infodba who is in dba group but it does not work when I use root user.

Cheers
Steve

Hi , he best way to achieve that is modify your .profile, add the following line :

PATH=${PATH}:.

An be sure to export it.

Regards

Thanx Klashxx.

I will try it and see how it goes.

Cheers
Steve

I must point out that you increase your risk of an exploit if you modify the root PATH, particularly if you insert in front of the path rather than extending it. For instance, if you put the current-dir (".") in the front of the PATH, then any ordinary user can destroy the system by putting a "rm -fr /" inside a file called "/tmp/ls". If root ever cd's to /tmp and types "ls"...bang.

For security purposes, you should never put a directory in the root PATH that ordinary users have write-access to. Additionally, the root user should not rely on the PATH but rather use full pathnames (I realize this additional step is annoying, so adjust your paranoia level accordingly).

I'll second that - do not have "." in your PATH - it's an accident waiting to happen.
And a decent sys admin will not allow it in root's PATH!
In fact, root shouldn't be running things that don't belong to root, anyway.
Thinking you ned root to run something usually just means you haven't thought through what is really required.

Thank advice guys.

I will avoid modifying the root PATH and try finding a better method.

Steve

Opps .. Steve i didn't notice that you wanted to use the root user. Sorry about that and tnx gus2000 & prowla.