Profile Issue


 
Thread Tools Search this Thread
Operating Systems Solaris Profile Issue
# 1  
Old 09-23-2008
Profile Issue

when I log into my solaris box, my environment variables are not getting set, and i am getting this error? any ideas?
-sh: ORACLE_BASE=/u01/oracle: is not an identifier

part of .profile is:

export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=$ORACLE_BASE/app/products/10.2.0/db_1
...
# 2  
Old 09-23-2008
Switch to ksh or bash.
# 3  
Old 09-23-2008
try:
Code:
VAR=some/value
export VAR

You cannot have export on the line where the value is assigned to the variable.
The Bourne Shell does not export environment variables to children unless explicitly instructed to do so by using the export command.
# 4  
Old 09-24-2008
Quote:
Originally Posted by jim mcnamara
You cannot have export on the line where the value is assigned to the variable.
I would say you can do it in all POSIX compliant shells but /usr/bin/sh and /sbin/sh aren't compliant under Solaris.

/bin/sh is a legacy shell that remains only for compatibility reasons with mostly hypothetical antique scripts.
It shouldn't be assigned to a real user because it lacks so many useful and standard features.
# 5  
Old 09-24-2008
Nevertheless the .profile should be kept sh -compatible because it is used by sh, by whatever process or user might be assigned /bin/sh as a login shell. In this particular case, the hurdle is minimal.
# 6  
Old 09-24-2008
I agree /etc/profile should be kept sh-compatible but I still think assigning /bin/sh to a real user is a poor practice and an annoyance to these users.
# 7  
Old 09-24-2008
TRY THIS THIS CAUSE NO PROBLEM
run once .profile and then logout and then again login and check.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Issue Regarding environment/.profile file

Hi All, I have my own .profile file and environment file. To execute some commands I always need to load some module using module command and change my environment files to project environment file (. /some/project/some/path/init.environ).Without changing my environment file to project file,... (2 Replies)
Discussion started by: saps19
2 Replies

2. Shell Programming and Scripting

.profile issue with UNIX

Hi, There is a user in Solaris-10 zone, ora_big01. Its .profile is not getting executed due to some reason and I am not able to find that. root@trddpd-dwsq04:/# cat /etc/passwd | grep -i ora_big01 ora_big01:x:242349:220:Siebel for QA:/ccq/apps/siebel:/usr/bin/ksh root@trddpd-dwsq04:/# which ksh... (3 Replies)
Discussion started by: solaris_1977
3 Replies

3. Solaris

[solved] Jumpstart Profile Issue

I have created profile file for zfs root (flash) on a wanboot server when i try to validate the rules file with check i get following error .. i 'm not sure why i 'm getting this error .. can any one help me on this ? # ./check Validating rules... Validating profile profile... Error in... (0 Replies)
Discussion started by: fugitive
0 Replies

4. Infrastructure Monitoring

trap in etc/profile and user .profile

Hello I really wonder what's trap in etc/profile and in each user .profile. I try to google for it but I think I have no luck. Mostly hit is SNMP traps which I think it is not the same thing. I want to know ... 1. What's a "trap 2 3" means and are there any other value I can set... (4 Replies)
Discussion started by: Smith
4 Replies

5. UNIX for Dummies Questions & Answers

difference between /etc/profile and .profile?

What is the difference between /etc/profile and .profile? (5 Replies)
Discussion started by: gehlnar
5 Replies

6. UNIX for Dummies Questions & Answers

Profile execution issue

Hi I have a profile execution issue, I log on to a linux machine , then i do sudo to another user as sudo su - <username> , then <username> .profile executes properly but when I type something I loose all environment varaible and my prompt changes to '$' loosing the PS1 value that I have... (1 Reply)
Discussion started by: malavm
1 Replies

7. Shell Programming and Scripting

Issue about how to add a block into profile?

I have to write a rbac script to add something into a role's profile, this script will be executed for many times, during this script, it will add a block into the profile. if the profile exists, it should check the block has been there, if, just replace it with the latest settings, take an... (0 Replies)
Discussion started by: a2156z
0 Replies

8. UNIX for Dummies Questions & Answers

Where can I read about the difference between "..profile" and ".profile"

Hi I know from reading O Riley's Classic Shell Scripting' that the .profile file is " the shells configuration file" but I am unable to find a reference to what "..profile" means. I have searched on the net, Sams Teach Yourself Unix, Unix Visual Quickstart Guide and Linux in a Nutshell. I have... (2 Replies)
Discussion started by: zorrokan
2 Replies

9. SCO

Difference between .profile and .~/.profile

what is the difference between these two lines, if we use it in korn shell script: .profile .~/.profile (3 Replies)
Discussion started by: maneesh mehta
3 Replies

10. UNIX for Dummies Questions & Answers

changed .profile but didnt ./.profile, yet reflected changes

hi , i added ls -F to .profile. and i need to do ./.profile for the effect to take effect BUT i didnt and YET the next day when i came to work and log in, the changes took effect. i am on aix. please explain.. thanks (4 Replies)
Discussion started by: yls177
4 Replies
Login or Register to Ask a Question