.profile issue with UNIX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting .profile issue with UNIX
# 1  
Old 02-27-2013
.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.
HTML Code:
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
/usr/bin/ksh
root@trddpd-dwsq04:/# su - ora_big01
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
.profile[7]: tset:  not found
$ head -4 .profile
#!/usr/bin/ksh
# Set up the terminal:
       if [ "$TERM" = "" ]
       then
$
# 2  
Old 02-27-2013
The shebang #!/usr/bin/ksh is useless in .profile because it is sourced, not executed.

Where is tset? Perhaps it's not in the users' PATH.
# 3  
Old 02-27-2013
I have removed that ksh path. Here is the copy of .profile
Code:
# Set up the terminal:
       if [ "$TERM" = "" ]
       then
           eval ` tset -s -Q -m ':?hp' `
       else
           eval ` tset -s -Q `
       fi
       stty erase "^H" kill "^U" intr "^C" eof "^D"
       stty hupcl ixon ixoff
       tabs
# Set up the search paths:
PATH=$PATH:/opt/bin:/lib:/usr/bin:/usr/sbin:/ccq/apps/sunoneweb/SUNWwbsvr:/usr/platform/sun4u/sbin:/usr/ucb:/usr/local/bin:/usr/local/sbin:/usr/xpg4/bin:/etc:/lib:/bin:/sbin:/usr/jdk/instances/jdk1.5.0/jre:/ccq/apps/oracle/product/10.2.0/client_1:/opt/IBM/ldap/V6.0/lib:/usr/openwin/bin:/ccq/apps/siebel/siebsrvr/bin:/var/adm:/var/adm/siebel:/ccq/apps/siebel/sweapp/bin
# Set up the shell environment:
        set -u
        trap "echo 'logout'" 0
# Set up the shell variables:
        EDITOR=vi
        export EDITOR
# Set up Oracle Environment:
        ORACLE_HOME=/ccq/apps/oracle/product/10.2.0/client_1
        export ORACLE_HOME
       ORACLE_SID=TCCQ
        export ORACLE_SID
       PATH=$PATH:$ORACLE_HOME/bin
        export PATH
       ORACLE_TERM=xterm
       export ORACLE_TERM
       TNS_ADMIN=$ORACLE_HOME/network/admin
       export TNS_ADMIN
        NLS_LANG=AMERICAN
        export NLS_LANG
        NLS_SORT=BINARY
        export NLS_SORT
        ODBCINI=/ccq/apps/siebel/siebsrvr/sys/.odbc.ini
        export ODBCINI
# Set up Siebel Environment:
        LD_LIBRARY_PATH=/lib:/usr/local/lib:/usr/lib:/ccq/apps/oracle/product/10.2.0/client_1/lib32:/ccq/apps/siebel/siebsrvr/lib:/ccq/apps/siebel/siebsrvr/mgmtagent/lib:/ccq/apps/siebel/sweapp/bin:/ccq/apps/siebfs:/ccq/apps/sunoneweb/SUNWwbsvr
        export LD_LIBRARY_PATH
        SIEBEL_LOG_EVENTS=0
        export SIEBEL_LOG_EVENTS
        SIEBEL_SESSMGR_TRACE=0
        export SIEBEL_SESSMGR_TRACE
        SIEBEL_SISNAPI_TRACE=0
        export SIEBEL_SISNAPI_TRACE
exec bash -o vi
SIEBEL_LOG_EVENTS=4
SIEBEL_SESSMGR_TRACE=4
SIEBEL_SISNAPI_TRACE=4

# 4  
Old 02-27-2013
tset is not a standard command but part of the ones providing SunOS 4 (i.e. BSD) compatibility to Solaris. You need to have /usr/ucb in your PATH for the shell to be able to run it but, unfortunately, you set the PATH too late for tset to be found.
Either put the whole path to call tset:
Code:
eval ` /usr/ucb/tset -s -Q ...

or simply move the PATH assignment at the beginning of your .profile script.

By the way, there are some pointless components in your PATH:

  • /usr/bin is added while it is certainly already in the initial PATH.
  • /bin is added but is already there (/bin is a link to /usr/bin on Solaris)
  • /usr/xpg4/bin is added but no command will be picked from it as all will be found in /usr/bin which appears first in the PATH (/usr/xpg4/bin only makes sense when put at the beginning of the PATH)
  • /lib is duplicated
  • /etc shouldn't be there (commands here are just symbolic links to real ones in /usr/sbin or /sbin).
  • /var/adm shouldn't be here as no commands are expected to stay here
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Where to see my .profile file in UNIX?

Hi where to see my .profile file in unix thanks Dharma (2 Replies)
Discussion started by: na.dharma
2 Replies

2. 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

3. UNIX for Dummies Questions & Answers

how to open .profile in Korn UNIX

How to open/view .profile file in Korn Unix. I need the path to .profile as well. Thanks, Kumar (1 Reply)
Discussion started by: vasan2815
1 Replies

4. 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

5. 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

6. 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

7. Solaris

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 ... (6 Replies)
Discussion started by: scorphg
6 Replies

8. Shell Programming and Scripting

Profile File in Unix

Hi, I have to run a sqr program. In the profile file everything is set. e.g APPLID=personel APPPATH=/${ENVIRONMENT}/${APPPATH} and so on.. SQRDIR=/opt/sqr/bin/syb Still when I'm running this script,its giving error APPLID not set and SQRDIR not set. Any idea,why? TIA (5 Replies)
Discussion started by: autosys_nm
5 Replies

9. UNIX for Dummies Questions & Answers

full path of .profile in unix

need a help, am a newbe in unix how do i locate the full path of the .profile where the environmental variable for a user is set. thanks (6 Replies)
Discussion started by: dba
6 Replies

10. Shell Programming and Scripting

What is .profile in unix ?

1. What is .profile in unix ? 2. What are they used for ? (2 Replies)
Discussion started by: guhas
2 Replies
Login or Register to Ask a Question