Visit Our UNIX and Linux User Community


Solaris 9 -- unable to set permanent PATH


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris 9 -- unable to set permanent PATH
# 1  
Old 08-20-2009
Solaris 9 -- unable to set permanent PATH

Hi,
I've read forums far and wide trying to learn how to append to my PATH in Solaris 9 and every time I think I am close I discover my system is not configured the same. Its so frustrating because this all stems from a new server I am trying to setup identical to the production machine. (Of course I didn't configure the production box and on that machine it works how I want it).

So to recap what I am trying to accomplish.

In Solaris 9 add paths to the PATH env variable permanently; other words every time I start a ssh session switch to root I get the path and don't have to add it each time. And applications I start will continue to run with those env variables even after disconnect.

Other details:
My system doesn't utilize home directories, don't know why but they don't exist, not that this should matter since the prod box doesn't use them. I've looked in the /etc/default and /etc/login on the production machine but nothing matches the path I see when type "set" at the console. I've looked for .bashcrc and the .crsch files and I can't find them using "find" so I don't believe these are not the problem. I've also looked at the /etc/skel files but the path isn't there either. Last detail; the PATH I want that shows on prod machine only appears when logged in as root.

So from what I understand I've tried everything that has been posted. Now I am resorting to posting my own experience. I hope someone can help.

Thanks,
Thor
# 2  
Old 08-20-2009
have a look at the file "/.profile" for the PATH settings.
# 3  
Old 08-20-2009
Root's specific path can be set by commenting out and modifying the SUPATH variable in /etc/default/su and /etc/default/login.
# 4  
Old 08-20-2009
I didn't have /.profile on my system. However when I looked at the SUPATH in SU I was led to exactly the information I needed.

I am very thankful for the info Jlliagre this solved my issue and I guarantee I won't forget it.

All the different ways to set variables seems convoluted, but I am catching on.

Thor
# 5  
Old 08-20-2009
The /etc/default/login is where to modify PATH
# 6  
Old 08-20-2009
Quote:
Originally Posted by solaris_user
The /etc/default/login is where to modify PATH
this was already answered in post #3! please read all answers to avoid double posts...

Previous Thread | Next Thread
Test Your Knowledge in Computers #480
Difficulty: Easy
Memory addresses are represented using hexadecimal, which is a base-8 counting system.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to set variable permanent in csh?

We are using csh on our AIX platform, if we have to export/set a specific environment variable we use setenv command but its only valid till session. How do we set that variable permanent in our csh AIX? Do we put it in userprofile file or something else? (1 Reply)
Discussion started by: aixusrsys
1 Replies

2. Shell Programming and Scripting

Unable to set PATH through ksh shell

I'm trying to set path for the current session but it is not doing so. It works perfectly on command line though. #!/usr/bin/ksh PATH=$PATH:/opt/quest/bin Is there any specific way to set path on korn? (3 Replies)
Discussion started by: pjeedu2247
3 Replies

3. Shell Programming and Scripting

Unable to set my PATH variable

Hello All, Hope you can understand my problem from the below code. $ cat ~/.profile PS1=`whoami`@`hostname`':$PWD $ ' export PATH="$PATH:.:/logarchive/utility/util:/usr/sbin:" $ echo $PATH /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/usr/sbin: $ echo $SHELL /usr/bin/ksh ... (6 Replies)
Discussion started by: sathyaonnuix
6 Replies

4. Solaris

How to set permanent aliases?

Hi All On my Solaris 10 X86, under my root directory I have a file called Aliases. It is owned by root (root:root) and the user (I mean root) has rwx permissions. In this file I have set some aliases like the following alias a="cd /opt/IBM/WebSphere/AppAerver/Profiles" When I run the above... (0 Replies)
Discussion started by: chrs0302
0 Replies

5. HP-UX

set permanent ulimit

Hi all I have a request from user to change the file descriptors limit to 8192. The current setting are: root@xxxxx:(wmdev)> ulimit -a time(seconds) unlimited file(blocks) unlimited data(kbytes) 1048576 stack(kbytes) 131072 memory(kbytes) unlimited... (3 Replies)
Discussion started by: hedkandi
3 Replies

6. Solaris

how do i make a route entry permanent in the routing table on solaris 8?

how do I make sure that the entry in the routing table on Solaris 8 stay permanent after rebooting the server. For example route add 172.20.1.60 -netmask 255.255.255.0 172.20.255.253 Each time the server reboots the entry disappears when using the command netstat -nr (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

7. Solaris

Not Able to Set the path

Hi, I want to set the path for my application so I am setting the path as below -- PATH=${PATH}:.:/envs/mldev/tools:/envs/mldev/common/tools:${HOME}:/bin/p4v:/usr/j2se:/usr/j2se/bin:/usr/j2se/lib or PATH="\ /usr/bin:\ /usr/sbin:\ /usr/dt/bin:\ ... (7 Replies)
Discussion started by: smartgupta
7 Replies

8. AIX

How to set permanent variables

I set my TERM variable to work with SMIT and everything works fine but when I logged out and log in again I have to set the variable again. How can I set a permanent variable into the system so it will be as I wish even if a reboot is needed? I set variables this way: export VAR=value (7 Replies)
Discussion started by: agasamapetilon
7 Replies

9. Solaris

Permanent changes to PATH

Hi guys, I'm running Solars 8 on a V100 server at home for testing. If I switch user to root and do: # echo $PATH This is the output: /usr/sbin:/usr/bin I'm using rsync over ssh and need to add /usr/local/bin and /user/local/sbin. I do this by running the line: #... (3 Replies)
Discussion started by: Stin
3 Replies

10. Shell Programming and Scripting

How do I set permanent setenv !!!

Hello, I just want to know ow I can set permanent pathes or whatever using setenv command. I'm using c shell . regards, me (1 Reply)
Discussion started by: geoquest
1 Replies

Featured Tech Videos