[comp.unix.questions] default search path for root

woodward@uicbert.eecs.uic.edu (Jeff Woodward) (01/02/91)

i am having a heck of a time trying to find out how to set the
default search paths for standard users, and especially the
root user, in both system V and sunOS environments. yeah,
i know about "profile" for system V, and about .cshrc and
.login, and .profile for root, but how do i change the
"su" default path in system V?  

how do i do that for ALL users in sunOS?  

in particular, i'd really like to know where this info
is stashed in the manuals, cuz i've looked, but i can
t seem to find it.  i'd really like to know for future
ref!

thanks in advance for your help.

jp woodward
univ of ill at chicago

grant@bluemoon.UUCP (Grant DeLorean) (01/03/91)

woodward@uicbert.eecs.uic.edu (Jeff Woodward) writes:

>.login, and .profile for root, but how do i change the
>"su" default path in system V?  

 Under ISC, there is a file (/etc/default/su) that controls
su. If one sets SUPATH in that file, that will be the path
for folks while they are su'ed. You have to specify the whole
path, no shortcuts with this one...

>how do i do that for ALL users in sunOS?  

 I have no idea if Sun uses the above or not. It may give you a
starting place though...
-- 
 Grant DeLorean  (grant@bluemoon) {osu-cis!n8emr!, nstar!}bluemoon!grant
/* So just remember, if a weirdo in a blue suit comes up and offers you
some DOS, just say NO!
    (a message from the President's War on DOS committee) */

torsten@xdave.rni.sub.org (Torsten Leibold) (01/07/91)

woodward@uicbert.eecs.uic.edu (Jeff Woodward) writes:

>i am having a heck of a time trying to find out how to set the
>default search paths for standard users, and especially the
>root user, in both system V and sunOS environments. yeah,
>i know about "profile" for system V, and about .cshrc and
>.login, and .profile for root, but how do i change the
>"su" default path in system V?  

>how do i do that for ALL users in sunOS?  

>in particular, i'd really like to know where this info
>is stashed in the manuals, cuz i've looked, but i can
>t seem to find it.  i'd really like to know for future
>ref!

Sorry, I can't tell you for SunOS, but I know that information for
SysV, especially for SCO Xenix & Unix.
The PATH for su is defined in the text file /etc/default/su which
normally is absent.
The manual pages for su(C) describes the contents of that file as
follows:

   The file /etc/default/su can be used to control several
   aspects of how su is used. Several entries can be placed in
   /etc/default/su:
   
   SULOG    Name of log file to record all attempts to use su.
            Usually /usr/adm/sulog. If not set, no logfile is
            kept. (See example below.)
   
   PATH     The PATH environment variable to set for non-root
            users. If not set, it defaults to
            ``:/bin:/usr/bin.'' The current PATH environment
            variable is ignored.
   
   SUPATH   When invoked by root, the path is set by default
            to ``/bin:/usr/bin:/etc'', unless this variable is
            defined., The current PATH is ignored.
   
   CONSOLE  Attempts to use su are logged to the named device,
            independently of SULOG.


Maybe SunOS hides this information in a similar location... ??

+------------------------------------------------------------------------------+
|        Torsten Leibold, Hard- und Software, Viernheim, West Germany.         |
| UUCP: torsten@xdave.rni.sub.org ..!unido!cat!orfeo!rnihd!rniwd!xdave!torsten |
+------------------------------------------------------------------------------+

prc@erbe.se (Robert Claeson) (01/15/91)

In article <384@xdave.rni.sub.org>, torsten@xdave.rni.sub.org (Torsten Leibold) writes:

|> Sorry, I can't tell you for SunOS, but I know that information for
|> SysV, especially for SCO Xenix & Unix.
|> The PATH for su is defined in the text file /etc/default/su which
|> normally is absent.

I think that this scheme is specific to SCO's products. At least, I have
never seen it in UNIX products from other vendors, including AT&T.

-- 
Robert Claeson                  |Reasonable mailers: rclaeson@erbe.se
ERBE DATA AB                    |      Dumb mailers: rclaeson%erbe.se@sunet.se
Jakobsberg, Sweden              |  Perverse mailers: rclaeson%erbe.se@encore.com
Any opinions expressed herein definitely belongs to me and not to my employer.

py@meadow.uucp (Peter Yeung) (01/16/91)

In article <1991Jan15.135828.27402@erbe.se> prc@erbe.se (Robert Claeson) writes:
>
>In article <384@xdave.rni.sub.org>, torsten@xdave.rni.sub.org (Torsten Leibold) writes:
>
>|> Sorry, I can't tell you for SunOS, but I know that information for
>|> SysV, especially for SCO Xenix & Unix.
>|> The PATH for su is defined in the text file /etc/default/su which
>|> normally is absent.
>
>I think that this scheme is specific to SCO's products. At least, I have
>never seen it in UNIX products from other vendors, including AT&T.
>

/etc/default/su is in our AT&T System V 3.2 system for the 386 AT&T box.
However, it is not in our Motorola system though. I think it depends on
whoever was porting it. We were told by an AT&T rep that many vendors
do trim down the system when they port it. An example is the "layer"
program which allows the user to run multiple windows on an AT&T 630
terminal, most vendors chose not to port it since not too many people
use the AT&T 630 terminal.

>-- 
>Robert Claeson                  |Reasonable mailers: rclaeson@erbe.se
>ERBE DATA AB                    |      Dumb mailers: rclaeson%erbe.se@sunet.se
>Jakobsberg, Sweden              |  Perverse mailers: rclaeson%erbe.se@encore.com
>Any opinions expressed herein definitely belongs to me and not to my employer.


-- 
Peter Yeung     Amdahl Canada Ltd., Software Development Center
                2000 Argentia Road, Plaza 2, Suite 300
                Mississauga, Ont.   L5N 1V8
                Phone: (416) 542-6300    Fax: (416) 858-2233