[OpenIndiana-discuss] PATH Environment Variable:

Open Indiana openindiana at out-side.nl
Mon Sep 3 14:45:02 UTC 2012


Also read http://www.blastwave.org/jir/blastwave.fam step 5 carefully. 
It explains everything very well to my opinion. 

I prefer to create different users that have different PATH settings. For
example my user glassfish has his own PATH to the JAVA JDK and the glassfish
directory. User MySQL has his own PATH with access to the MySQL directory
but can't see the glassfish directory and vice-versa. 



-----Original Message-----
From: Reginald Beardsley [mailto:pulaskite at yahoo.com] 
Sent: maandag 3 september 2012 12:24
To: Discussion list for OpenIndiana
Subject: Re: [OpenIndiana-discuss] PATH Environment Variable:

Controlling the executable search path is quite important.   There is no
"right" answer other than always use the environment variable and not a
shell built in (e.g. path instead of PATH).

Scripts run by cron should always use explicit full paths. The best way to
do this is to define variables at the beginning of the script and then use
those later.

For example:

AWK=/bin/nawk
LS=/bin/ls

${LS} -li | ${AWK} '{print $1 ,$6 ,$10}'

There is a lot of system administration lore (e.g. sudo, RBAC) embedded in
Solaris which is essential in a large system environment, but not really
needed in a small one.

Fiddling w/ the root environment is frowned upon because it can have
unpleasant consequences when you least want them.

Have Fun!
Reg

--- On Mon, 9/3/12, Armin Maier <ma2412 at gmx.de> wrote:

> From: Armin Maier <ma2412 at gmx.de>
> Subject: [OpenIndiana-discuss] PATH Environment Variable:
> To: openindiana-discuss at openindiana.org
> Date: Monday, September 3, 2012, 4:06 AM Hello Indiana's :)
> 
> I have configured Openindiana to be able to login as root without 
> first login as an unprivileged user and after that run sudo. Now i had 
> a problem within a Script (chmod
> command) and found out that the $PATH variable is different from 
> signing in with "sudo su". I know the reason is the "~/.profile" 
> Script where "/usr/gnu/bin" is added in front of the PATH variable, 
> but what is the reason for this behavior? Until now i was not aware of 
> that but i can imagine that this could make  troubles in scripts 
> scheduled by cron for example.
> 
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
> 

_______________________________________________
OpenIndiana-discuss mailing list
OpenIndiana-discuss at openindiana.org
http://openindiana.org/mailman/listinfo/openindiana-discuss




More information about the OpenIndiana-discuss mailing list