Solved

set ROOT PATH using solaris 2.5.1

Posted on 1998-07-24
2
338 Views
Last Modified: 2013-12-16
how to set environment for user ROOT permenantly using solaris 2.5.1
0
Comment
Question by:mahadir
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
jlms earned 10 total points
ID: 1812377
That depends on the shell you are using for root.
Check your /etc/passwd file, look for the line describing root and at the end is the shell that is being used.

If root is using /bin/csh, then you need in root's home directory (usually / ) the files .login and .cshrc and there you can define stuff.

If root is using other shell (typically /bin/sh or /bin/ksh) then you need .profile in root's home directory.
0
 
LVL 2

Expert Comment

by:blowfish
ID: 1812378
The information that you were given will work, but it is not exactly correct.  

First of all, root's shell should always be /sbin/sh, never anything else.  This version of the shell is statically linked, and does not require any dynamically loaded libraries that would not be available at boot time if /usr could not be mounted or accessed.  /sbin is always on the / (root) filesystem.  

To modify root PATH, edit /etc/default/login and find the following line(s):

    # SUPATH sets the initial shell PATH variable for root
    #
    SUPATH=/usr/sbin:/usr/bin

Change the list of directories to suit your needs, and the next time you login as root, your new path will be active.  

--frankf
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question