Solved

set ROOT PATH using solaris 2.5.1

Posted on 1998-07-24
2
337 Views
Last Modified: 2013-12-16
how to set environment for user ROOT permenantly using solaris 2.5.1
0
Comment
Question by:mahadir
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sudo logging 5 108
FTP on FreeBSD server 2 152
UNiX Script filesystem space usage 19 79
AIX check for filesystems not mounted but mount = true 4 38
Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

679 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