Solaris 11 + PATH enviroments variables

Thread Tools Search this Thread
Operating Systems Solaris Solaris 11 + PATH enviroments variables
# 1  
Old 09-29-2011
Solaris 11 + PATH enviroments variables

Ok, this is the little annoying.
I can't set up $PATH variable for all non root users on Solaris 11 express.

oracle@DevelopBox01:/export/home/oracle$ cat /etc/default/login 
# PATH sets the initial shell PATH variable

and when I echo the variable then all I see is
oracle@DevelopBox01:/export/home/oracle$ echo $PATH

And I need to set only for user oracle certain varibles

oracle@DevelopBox01:/export/home/oracle$ grep ORACLE_ .login
ORACLE_BASE=/opt/oracle; export ORACLE_BASE
ORACLE_SID oracle; export ORACLE_SID

and of course I don't how to set up something trivial like that, this varibles must be initialed upon login.
User shell is KSH93


Last edited by solaris_user; 09-29-2011 at 03:00 PM.. Reason: fixed
# 2  
Old 09-29-2011
As far as KornShell is concerned, I believe you need to modify different files:

If the shell is invoked by exec(2), and the first character of argument zero ($0) is -, then the shell is assumed to be a login shell and commands are read from /etc/profile and then from either .profile in the current directory or $HOME/.profile, if either file exists.
Ref: KornShell 93 Manual Page
# 3  
Old 09-29-2011
Do you have any PATH variable in the .profile?

My guess is that maybe it's something like

Where it should:

Can you cat the .profile to the forum?
# 4  
Old 10-01-2011
oracle@DevelopBox01:/export/home/oracle$ cat .profile 
# Simple profile places /usr/gnu/bin at front,
# adds /usr/X11/bin, /usr/sbin and /sbin to the end.
# Use less(1) as the default pager for the man(1) command.
export PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin
export PAGER="/usr/bin/less -ins"

# Define default prompt to <username>@<hostname>:<path><"($|#) ">
# and print '#' for user "root" and '$' for normal users.
    [[ "${LOGNAME}" == "root" ]] && printf "%s" "${PWD/${HOME}/~}# " ||
    printf "%s" "${PWD/${HOME}/~}\$ ")

# 5  
Old 10-02-2011
The variable PATH is being overwritten on login via the current .login file.

Put the following line instead of what's present and that will do it:

export PATH=$PATH:/usr/gnu/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin

Wanna test it before editing your file? Try the following at the prompt:
export PATH=$PATH:/usr/bin:/opt/DTT:/opt/DTT/bin:/opt/solstudio12.2/bin:/opt/solstudio12.2/bin/amd64:

and then
echo $PATH

Hope it fixes your problem.

Thanks Jlliagre, I did not notice this one ...

Last edited by plmachiavel; 10-03-2011 at 09:12 AM..
# 6  
Old 10-03-2011
You should remove some unnecessary paths and add some others:
export PATH=/usr/bin:/usr/sbin:/sbin:/opt/DTT/bin:/opt/solstudio12.2/bin:

---------- Post updated at 07:33 ---------- Previous update was at 07:31 ----------

Originally Posted by plmachiavel
Try the following at the prompt:
export PATH:$PATH:/usr/bin:/opt/DTT:/opt/DTT/bin:...

export PATH=$PATH:/usr/bin:/opt/DTT:/opt/DTT/bin:...

# 7  
Old 10-07-2011
Thanks, I successfully setted my PATH variable but for some reason Oracle database 10 won't start. I am going to try with some other database, it is for my college purposes only and I want a good knowledge in databse field. Will try with databse 11 but requires too much RAM.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Solaris 10 Learning Path

Hello, Im fairly new to the UNIX world. Although I have taken Linux admin classes, it's not enough compared on what you do at your job. I just got a new job and they want me to learn Solaris, I got some good books and I started to read, I run the commands and try to follow some basics examples.... (7 Replies)
Discussion started by: sanz.rigo
7 Replies

2. Solaris

Solaris Boot Path

Hello, I have one query 1) how to find in Solaris 10 a) Boot Path b) Boot Disk name Pls help. (4 Replies)
Discussion started by: saurabh84g
4 Replies

3. Solaris

Solaris 10 + mpxio Path

Hi, I have an Oracle/Sun T3-2 Server with a duel SAS controller Fujitsu DX60 array attached. I have 2 x SAS HBA's in the T3-2. One HBA cabled to CM0 and one HBA cabled to CM1 of the array. The array is setup with one RAID GROUP and one VOLUME and one LUN In Solaris I can see one device... (4 Replies)
Discussion started by: general_lee
4 Replies

4. Shell Programming and Scripting

unix Library path variables.

Library path variables. I need to know the library rnvironment variable in linux. Ie, I install zlib directory in the custom path /usr/local/mylib and give --enable-zlib in the ffmpeg install, ffmpeg should check for the zlib libraries in the path /usr/local/mylib. Currently it checks /usr/lib... (5 Replies)
Discussion started by: anilcliff
5 Replies

5. Solaris

Solaris zones and PATH

Hi, I use a zoned solaris box, 5.10 Generic_118833-33, E2900. It is used for both a database and application. The databases are installated on one zone and then there are separate live, development and test application zones. There has been a requirement to install openldap on the... (1 Reply)
Discussion started by: jabberwocky
1 Replies

6. Shell Programming and Scripting

Shell Path Autocomplete w/ Variables

Suppose there exists a file, "/home/andrew/product/test". And suppose I set $FOO to "/home/andrew/product/"? I can't seem to type "$FOO/t" and then Escape (csh) in order to autocomplete. Is this possible in other shells? If not, then why? If so, then why can't csh do it, and how can I make... (1 Reply)
Discussion started by: acheong87
1 Replies

7. Shell Programming and Scripting

PATH on solaris 8 (bash)

Im trying to setup my profile to export the PATH at login i had this in my .bashrc export PATH=/usr/local/bin:/usr/bin/ however when i login and type echo $PATH i only get bash-2.05$ echo $PATH /usr/bin: any ideas on what im doing wrong? ive used linux for years but this is my... (1 Reply)
Discussion started by: recklessop
1 Replies

8. UNIX for Dummies Questions & Answers

path variables

I'm looking for an explanation to what appears to be some kind of shell substitution values found in various path environment variables such as PATH, CDPATH, MANPATH, etc. These values appear as things like %T, %S, %N, %L. I'm not sure what these mean, and have searched through a multitude of man... (6 Replies)
Discussion started by: sszd
6 Replies

9. UNIX for Dummies Questions & Answers

Solaris 8 Font Path ...

Hello, I feel a little initimidated to ask this question, but ... where am I able to find the font path (Solaris 8)? Bye Sysadv (1 Reply)
Discussion started by: sysadv
1 Replies

10. UNIX for Advanced & Expert Users

path name for Solaris 8 ?

hello all, instead of type pwd everytime to find down where I am at. is there a command set prompt to put in to your profile on shell so it invisible every you type cd? thanks in advance... (3 Replies)
Discussion started by: phapvn
3 Replies
Login or Register to Ask a Question