Link to home
Start Free TrialLog in
Avatar of jomfra
jomfra

asked on

how to get to unix prompt after logging into my uix server

Hello expert,

I running oracle database in unix environment.

When a users log into the unix box  he/she is directed immediately to the application

Program log on screen

login: audbra
Password:
Last login: Mon May 29 15:04:25
Sun Microsystems Inc.   SunOS 5.7       Generic October 1998
 
Good Morning Audrey. You are connected to xxx.xxx.xxx.xxx
 
Date/Time ............. Fri 02/03/2007  10:48
Home directory ........ /export/home/livenbs7/users/audbra
Group name ............ livenbs7
Foresight directory ... /applics/fore7700
Foresight release ..... 7.9.06.06

SADM006M                          Foresight                       02nd Mar 2007
(1.14)                          System Log On                     New Building S
[------------------------------------------------------------------------------]
|                                                                              |
|                                                                              |
|                                                                              |
|          ######  ####  #####  #####  ####  ###  ####   #    # #####          |
|          #      #    # #    # #     #    #  #  #    #  #    #   #            |
|          #      #    # #    # #     #       #  #       #    #   #            |
|          ###    #    # #####  ###    ####   #  #       ######   #            |
|          #      #    # #  #   #          #  #  #  ###  #    #   #            |
|          #      #    # #   #  #          #  #  #    #  #    #   #            |
|          #      #    # #    # #     #    #  #  #    #  #    #   #            |
|          #       ####  #    # #####  ####  ###  ####   #    #   #            |
|                                                                              |
|                                                                              |
|                                                                              |
[------------------------------------------------------------------------------]
|        User ID  AUDBRA               Name AUDREY BRANDT                      |
|                                                                              |
|        Password                                                              |
[------------------------------------------------------------------------------]
Working...

I would the user to get to the unix prompt  when he/she log onto the

Unix box  

Audbra > 

And not be directed immediately to the application logon screen

thanks
 
Avatar of Steve Wales
Steve Wales
Flag of United States of America image

Depending upon the shell they are using, there's going to be a .profile, .login, .cshrc or something like that that's being executed when the user logs in.

I would assume that one of these files has a line in it that is executing the command to start the application.

Look through them and see if you can see it
Avatar of jomfra
jomfra

ASKER

hello expert

local.cshrc    local.login    local.profile

foredba>cat local.cshrc
# @(#)cshrc 1.11 89/11/29 SMI
umask 022
set path=(/bin /usr/bin /usr/ucb /etc .)
if ( $?prompt ) then
        set history=32
endif

foredba>cat local.login
# @(#)local.login 1.4     98/02/06 SMI
stty -istrip
# setenv TERM `tset -Q -`
 
#
# if possible, start the windows system.  Give user a chance to bail out
#
if ( "`tty`" == "/dev/console" ) then
 
        if ( "$TERM" == "sun" || "$TERM" == "AT386" ) then
 
                if ( ${?OPENWINHOME} == 0 ) then
                        setenv OPENWINHOME /usr/openwin
                endif


foredba>cat local.profile
#
# @(#)local.profile 1.6 98/02/06 SMI
#
stty istrip
PATH=/usr/bin:/usr/ucb:/etc:.
export PATH
 
#
# If possible, start the windows system
#
if [ "`tty`" = "/dev/console" ] ; then
        if [ "$TERM" = "sun" -o "$TERM" = "AT386" ] ; then
 
                if [ ${OPENWINHOME:-""} = "" ] ; then
                        OPENWINHOME=/usr/openwin
                        export OPENWINHOME
                fi
 
                echo ""
                echo "Starting OpenWindows in 5 seconds (type Control-C to inte"
                sleep 5
                echo ""
                $OPENWINHOME/bin/openwin
 
                clear           # get rid of annoying cursor rectangle
                exit            # logout after leaving windows system
 
        fi
fi
 
foredba>
 
                echo ""
                echo -n "Starting OpenWindows in 5 seconds (type Control-C to i"
                sleep 5
                echo ""
                $OPENWINHOME/bin/openwin
                clear           # get rid of annoying cursor rectangle
                logout          # logout after leaving windows system
 
        endif
 
endif
foredba>
Without knowing the details of your system, hard to give further advice.

Another place to check is the system default profile (/etc/profile on HPUX, may need to check for other platforms to see specifically what it is - looks like you're on Solaris?).

What is the command to start the application?
Did those listings you provided come from the $HOME for the user audbra? (Which looks to be /export/home/livenbs7/users/audbra).

(You may also get better mileage in the Unix forum for this question, rather than in the Oracle 9i forum).
sjwales,

This is cross posted to the Sun zones as well.

jomfra,

I agree with sjwales in that it will be real hard for us to get you a 100% accurate soultion because of other set up scripts your shop may be running.  There are also many scripts that get executed on login to UNIX.  

My guess this is controlled by a system level script so all users execute the same login script.  CAn your system administrators not help you with this?
You need to look at the contents of

.profile

in the users home directory.

Avatar of jomfra

ASKER

hello experts

thanks for all the advice

thanks
Avatar of jomfra

ASKER

hello tintin,

>> You need to look at the contents of

.profile

in the users home directory.

could you please elaborate for me.

unsure how to move forward on this one
Post the contents of:


/export/home/livenbs7/users/audbra/.profile
Also post the contents of

grep audbra /etc/passwd
Avatar of jomfra

ASKER

hello

/export/home/livenbs7/users/audbra/.profile

when i execute this  the following message

ksh: /export/home/livenbs7/users/audbar/.profile: not a directory

but within  export/home/livenbs7/users/audbra directory are these three files

local.cshrc    local.login    local.profile




foredba>cat local.profile
#
# @(#)local.profile 1.6 98/02/06 SMI
#
stty istrip
PATH=/usr/bin:/usr/ucb:/etc:.
export PATH
 
#
# If possible, start the windows system
#
if [ "`tty`" = "/dev/console" ] ; then
        if [ "$TERM" = "sun" -o "$TERM" = "AT386" ] ; then
 
                if [ ${OPENWINHOME:-""} = "" ] ; then
                        OPENWINHOME=/usr/openwin
                        export OPENWINHOME
                fi
 
                echo ""
                echo "Starting OpenWindows in 5 seconds (type Control-C to inte"
                sleep 5
                echo ""
                $OPENWINHOME/bin/openwin
 
                clear           # get rid of annoying cursor rectangle
                exit            # logout after leaving windows system
 
        fi
fi


grep audbra /etc/passwd

audbra:x:25054:50777:Audrey Brandt:/export/home/livenbs7/users/audbra:/usr/bin/ksh

thanks
By posting the contents, I mean, posting the contents of the file, ie:

cat /export/home/livenbs7/users/audbra/.profile

Ignore those three local files, they have no bearing on what is run when you login.  They are simple profile templates.

The .profile is hidden file. You can list all the all the files in the folder as following:

ls -la /export/home/livenbs7/users/audbar

Please cat /etc/profile as well.
Avatar of jomfra

ASKER

hello expert,

Sorry for the delay in response i was away for a few days.

>> cat /export/home/livenbs7/users/audbra/.profile

# cat /export/home/livenbs7/users/audbra/.profile
#       This is the default standard profile provided to a user.
#       They are expected to edit it to meet their own needs.
 
MAIL=/usr/mail/${LOGNAME:?}



# cat /etc/profile
 
 
# The profile that all logins get before using their own .profile.
 
trap ""  2 3
export LOGNAME PATH
 
# Create /tmp file as per Foresight
# Must come BEFORE the usual 'if term is null' stuff
if test "$TERM" = ""
then
        if test -r "/tmp/.term.$LOGNAME"
        then
                TERM="`cat "/tmp/.term.$LOGNAME"`" ;export TERM
        fi
fi
 
# This bit from pre-existing Sun file except for .term-creation line
if [ "$TERM" = "" ]
then
        if /bin/i386
        then
                TERM=AT386
        else
                TERM=vt220
        fi
        export TERM
        echo "$TERM" > "/tmp/.term.$LOGNAME"
fi
 
#       Login and -su shells get /etc/profile services.
#       -rsh is given its environment in its .profile.
 
case "$0" in
-sh | -ksh | -jsh)
 
        if [ ! -f .hushlogin ]
        then
                /usr/sbin/quota
                #       Allow the user to break the Message-Of-The-Day only.
                trap "trap '' 2"  2
                /bin/cat -s /etc/motd
                trap "" 2
 
                /bin/mail -E
                case $? in
                0)
                        echo "You have new mail."
                        ;;
                2)
                        echo "You have mail."
                        ;;
                esac
        fi
esac
 
umask 022
trap  2 3
 
SERVER_HOME=`grep "^oracle:" /etc/passwd|cut -f6 -d:`;export SERVER_HOME
 
GROUPNAME="`id |cut -d\( -f3 |cut -d\) -f1`" ;export GROUPNAME
case "$GROUPNAME" in
dba|fore*|omnia*|oracle*|live*|kermit)
        case "$LOGNAME" in
        oracle)
                ;;
        *)
                if /applics/foresightv7/bin/switchgroups -c
                then
                        exec /applics/foresightv7/bin/switchgroups -s
                fi
                ;;
        esac
        ;;
esac
case "$LOGNAME/$GROUPNAME" in
backup/*)
        PRODUCTS="sbin BSD omnia others terminal backup"
        ;;
tux*/tuxedo)
        PRODUCTS="tuxedo"
        ;;
sirback/*)
        PRODUCTS="sbin BSD omnia others omniasecure"
        ;;
lpadmin/*)
        PRODUCTS="sbin BSD omnia others terminal lpadmin"
        ;;
oracle/*)
        export ORACLE_HOME="/applics/oraclev732"
        PRODUCTS="dba oracle others "
        ;;
relman/*)
        ORACLE_SID="har701" ;export ORACLE_SID
        TWO_TASK="beqhar701" ;export TWO_TASK
        FORE_HOME="/export/home/relman/relcomp"; export FORE_HOME
        FORE_PRINT="/export/home/$GROUPNAME/spool"; export FORE_PRINT
        PRODUCTS="home greeting terminal development foresight oracle others BS"
        ;;
*/livehar7)
        PRODUCTS=""
        case "$LOGNAME" in
        foreback)
                PRODUCTS="home foresight oracle dba tuxedo foreback"
                ;;
        forelp)
                PRODUCTS="sbin $PRODUCTS"
                PATH=/usr/lib:$PATH;export PATH
                ;;
        foredba)
                TWO_TASK="beqhar701" ;export TWO_TASK
                PRODUCTS="dba sbin"
                ;;
        *)
                TWO_TASK="beqhar701" ;export TWO_TASK
                ;;
        esac
        ORACLE_SID="har701" ;export ORACLE_SID
        FORE_HOME="/applics/fore7602"; export FORE_HOME
        FORE_PRINT="/export/home/$GROUPNAME/spool"; export FORE_PRINT
        PRODUCTS="home greeting terminal foresight oracle others tuxconfig $PRO"
        ;;
*/livenbs7)
        PRODUCTS=""
        case "$LOGNAME" in
        foreback)
                PRODUCTS="home foresight oracle dba tuxedo foreback"
                ;;
        forelp)
                PRODUCTS="sbin $PRODUCTS"
                PATH=/usr/lib:$PATH;export PATH
                ;;
        foredba)
                TWO_TASK="beqnbs701" ;export TWO_TASK
                PRODUCTS="dba sbin"
                ;;
        tell)
                TWO_TASK="beqnbs701" ;export TWO_TASK
                ;;
        *)
                TWO_TASK="beqnbs701" ;export TWO_TASK
                PRODUCTS="foredirect"
                ;;
        esac
        ORACLE_SID="nbs701" ;export ORACLE_SID
        FORE_HOME="/applics/fore7700"; export FORE_HOME
        FORE_PRINT="/export/home/$GROUPNAME/spool"; export FORE_PRINT
        PRODUCTS="home greeting terminal foresight oracle others tuxconfig $PRO"
        ;;
*/kermit)
        PRODUCTS="home greeting kermit others"
        ;;
*/omnia*)
        PRODUCTS="BSD home greeting terminal omnia dmfx others"
        ;;
*/dba)
        PRODUCTS="oracle others dba"
        ;;
esac
 
###########################################################################
# Products Section
###########################################################################
 
for PRODUCT in $PRODUCTS
do
        case "$PRODUCT" in
        foredirect)
                exec fore
                ;;
        backup)
                exec backupmenu
                ;;
        foreback)
                exec fmli "$FORE_HOME/fmli/Menu.SADM014B"
                ;;
        BSD)
                case "$PATH" in
                */usr/ucb*)
                        ;;
                *:)
                        PATH="$PATH/usr/ucb" ;export PATH
                        ;;
                *)
                        PATH="$PATH:/usr/ucb" ;export PATH
                        ;;
                esac
                ;;
        dba)
                ORAENV_ASK="YES" ;export ORAENV_ASK
                ;;
        development)
                # Assume /usr/bin is already in PATH else appears twice
                case "$PATH" in
                *:)
                        PATH="$PATH/package/compilers/SC4.2/bin:$FORE_HOME/devtH
                        ;;
                "")
                        PATH="/package/compilers/SC4.2/bin:$FORE_HOME/devtools:H
                        ;;
                *)
                        PATH="$PATH:/package/compilers/SC4.2/bin:$FORE_HOME/devH
                        ;;
                esac
                XITDIR="$FORE_HOME/lib" ;export XITDIR
                PRCDIR="$XITDIR/pin" ;export PRCDIR
                REFDIR="$FORE_HOME/forms/reference" ;export REFDIR
                ;;
        foresight)
                . $FORE_HOME/bin/foresight.env
                ;;
        greeting)
                FULLNAME=`cat /etc/passwd | grep $LOGNAME | cut -d: -f5`
                FIRSTNAME=`echo $FULLNAME | cut -f1 -d" "`
                LOGINHOUR=`date '+%H%M'`
                if test -r "$FORE_HOME/install/foresight.ver"
                then
                        RELEASE=`head -1 $FORE_HOME/install/foresight.ver | cut`
                fi
 
                if [ $LOGINHOUR -ge 0000 -a $LOGINHOUR -le 1159 ]
                then
                        GREETING="Good Morning"
                elif [ $LOGINHOUR -ge 1200 -a $LOGINHOUR -le 1659 ]
                then
                        GREETING="Good Afternoon"
                elif [ $LOGINHOUR -ge 1700 -a $LOGINHOUR -le 2359 ]
                then
                        GREETING="Good Evening"
                fi
                echo "\n$GREETING $FIRSTNAME. You are connected to `uname -n`\n"
                echo "Date/Time ............. `date '+%a %d/%m/%Y  %H:%M'`"
                echo "Home directory ........ $HOME"
                echo "Group name ............ $GROUPNAME"
                if test -r "$FORE_HOME/install/foresight.ver"
                then
                        echo "Foresight directory ... $FORE_HOME"
                        echo "Foresight release ..... $RELEASE"
                fi
                echo
                ;;
        home)
                case "$LOGNAME" in
                relman)
                HOME="/export/home/relman" ;export HOME
                cd "$HOME"
                        ;;
                *)
                HOME="/export/home/$GROUPNAME/users/$LOGNAME" ;export HOME
                cd "$HOME"
                        ;;
                esac
                PS1="$LOGNAME>"
                ;;
        kermit)
                PATH="$PATH:/applics/kermitv5/bin" ;export PATH
                # exec modem
                ;;
        lpadmin)
                exec lpmenu
                ;;
        omnia)
                OMNIA_HOME="/applics/techservices" ;export OMNIA_HOME
                case "$PATH" in
                *$OMNIA_HOME/bin*)
                        ;;
                *:)
                        PATH="$PATH$OMNIA_HOME/bin" ;export PATH
                        ;;
                *)
                        PATH="$PATH:$OMNIA_HOME/bin" ;export PATH
                        ;;
                esac
                ;;
        omniasecure)
                #TERM=vt220 ; export TERM
                exec omniasecure backup Exabyte . none n /
                ;;
        oracle)
                if test "$ORACLE_SID" = ""
                then
                        if test -r "$HOME/.oracle_sid"
                        then
                                ORACLE_SID="`cat "$HOME/.oracle_sid"`" ;export D
                        else
                                ORACLE_HOME="`grep '^oracle' /etc/passwd |sed 1E
                                . $ORACLE_HOME/bin/oraenv
                        fi
                fi
                if test "$ORACLE_SID" != ""
                then
                        echo "$ORACLE_SID" > "$HOME/.oracle_sid"
                fi
                ORACLE_HOME="`grep '^'"$ORACLE_SID"':' /var/opt/oracle/oratab |E
                if test "$ORACLE_HOME" = ""
                then
                        ORACLE_HOME="`grep '^oracle' /etc/passwd |sed 1q |cut -E
                fi
                if test "$TWO_TASK" != ""
                then
                        ORACLE_HOME="/applics/oracle_tools" ;export ORACLE_HOME
                        export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/applics/oracl
                fi
                case "$PATH" in
                *$ORACLE_HOME/bin*)
                        ;;
                *:)
                        PATH="$PATH$ORACLE_HOME/bin" ;export PATH
                        ;;
                *)
                        PATH="$PATH:$ORACLE_HOME/bin" ;export PATH
                        ;;
                esac
                case "$PATH" in
 
                #Recheck so TWO_TASK users get server software also, for ProC
                */applics/oraclev732/bin*)
                        ;;
                *:)
                        PATH="$PATH/applics/oraclev732/bin" ;export PATH
                        ;;
                *)
                        PATH="$PATH:/applics/oraclev732/bin" ;export PATH
                        ;;
                esac
 
                LBIN="/applics/oraclev732/lbin" ;export LBIN
                case "$PATH" in
                *$LBIN*)
                        ;;
                *:)
                        PATH="$PATH$LBIN" ;export PATH
                        ;;
                *)
                        PATH="$PATH:$LBIN" ;export PATH
                        ;;
                esac
 
                ORAENV_ASK="NO" ;export ORAENV_ASK
                ORACLE_PAGER="pg" ;export ORACLE_PAGER
                ORACLE_LPPROG="lp" ;export ORACLE_LPPROG
                ORACLE_LPSTAT="lpstat" ;export ORACLE_LPSTAT
                ORAKITPATH="$ORAKITPATH:$ORACLE_HOME/forms30/admin/resource:$ORH
                FORMS30PATH="$FORMS30PATH:$ORACLE_HOME/forms30/admin/resource" H
                MENU5PATH="$MENU5PATH:$ORACLE_HOME/forms30/admin/resource" ;expH
                #LANGUAGE="American_America.US7ASCII" ;export LANGUAGE
                LANGUAGE="American_America.we8pc850" ;export LANGUAGE
                # Following variables added for Oracle 7.3.2
                export NLS_LANG="American_America.we8pc850"
                if [ ! "$LOGNAME" = "oracle" ]
                then
                        #Foresight specific settings
                        export FORMS45_PATH=":$FORE_HOME/forms/application:$FOR"
                        export FORMS45_TERMINAL="$FORE_HOME/terminal"
                        export ORACLE_TERMINAL="$FORE_HOME/terminal"
                        export TK23_FONTALIAS="$FORE_HOME/terminal"
                fi
                export ORACLE_TERM="vt220"
                export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/applics/oraclev732/li
                # May be obsolete:
                #export LD_RUN_PATH="$LD_RUN_PATH:$ORACLE_HOME/lib"
                # Following has hard-coded ORACLE_HOME for machines having
                # coexisting Oracle6 and Oracle7 databases
                export ORA_NLS32="/applics/oraclev732/ocommon/nls/admin/data"
 
                ;;
        others)
                CDPATH=":$HOME" ;export CDPATH
                MAIL="/var/mail/$LOGNAME" ;export MAIL
                MAILCHECK="600" ;export MAILCHECK
                PAGER="more" ;export PAGER
                EDITOR="vi" ;export EDITOR
                FCEDIT="vi" ;export FCEDIT
                TMPDIR="/var/tmp" ;export TMPDIR
                EXINIT="se redraw directory=$TMPDIR" ;export EXINIT
        # Gives "Couldn't set locale correctly" message if LANG set"
        #       LANG="En_GB.646" ;export LANG
                set -h
                ;;
        ots)
                OTSDIR="/usr/ots" ;export OTSDIR
                PATH="$PATH:$OTSDIR/bin" ;export PATH
                ;;
        sbin)
                case "$PATH" in
                */usr/sbin*)
                        ;;
                *:)
                        PATH="$PATH/usr/sbin" ;export PATH
                        ;;
                *)
                        PATH="$PATH:/usr/sbin" ;export PATH
                        ;;
                esac
                ;;
        terminal)
                case "$TERM" in
                wyse60)
                        TERM="wyse60-hy25" ;export TERM
                        ;;
                m10*)
                        case "$LOGNAME/GROUPNAME" in
                        fore*/*|*/fore*)
                                TERM="m10" ;export TERM
                                ;;
                        esac
                esac
                ;;
        tuxedo)
                APPDIR="/applics/fore04st/tuxconfig" ; export APPDIR
                VIEWDIR="/applics/fore04st/tuxconfig" ; export VIEWDIR
                ROOTDIR="/applics/tuxedov41" ;export ROOTDIR
                ULOGPFX="/applics/fore04st/tuxconfig/ULOG" ; export ULOGPFX
                OMNIA_MSG="Message" ; export OMNIA_MSG
                TUXCONFIG="/applics/fore04st/tuxconfig/tuxconfig" ; export TUXCG
                case "$NLSPATH" in
                *$ROOTDIR/locale/C*)
                        ;;
                *:)
                        NLSPATH="$NLSPATH$ROOTDIR/locale/C" ;export NLSPATH
                        ;;
                *)
                        NLSPATH="$NLSPATH:$ROOTDIR/locale/C" ;export NLSPATH
                        ;;
                esac
                case "$PATH" in
                *$ROOTDIR/bin*)
                        ;;
                *:)
                        PATH="$PATH$ROOTDIR/bin" ;export PATH
                        ;;
                *)
                        PATH="$PATH:$ROOTDIR/bin" ;export PATH
                        ;;
                esac
                ;;
        version)
#               if test "`who am i |cut -d' ' -f1`" = "$LOGNAME"
#               then
                        VERSIONS="`ls -d /applics/$LOGNAME* |sed -e 's/.*'"$LOG"
                        if test "$VERSIONS" != ""
                        then
                                NUMBEROFVERSIONS="`echo "$VERSION" |wc -l |tr -"
                                if test "$NUMBEROFVERSION" = "1"
                                then
                                        VERSION="$VERSIONS"
                                else
                                        VERSION="`/applics/omnia/bin/omniamenu "
                                fi
                                if test "$?" = "0"
                                then
                                        COMMAND="$ENVVAR=/applics/$LOGNAME`echo"
                                        echo "$COMMAND"
                                        eval "$COMMAND"
                                        cd
                                fi
                        fi
#               fi
                ;;
        esac
done
if [ "$TERM" = m5-s ]
    then
                tput reset
fi
#
Wow, that's a big /etc/profile

OK, at least we've finally determined it's /etc/profile that controls what application the user gets.  This is controlled by a combination of your username and most importantly, your primary group.

Essentially, you want to be in a group where the $PRODUCTS doesn't contain a product that uses an exec, eg: foredirect, backup etc.
Avatar of jomfra

ASKER

hello tintin,

how do i move or place the user in question to the backup or foredirect group

also could pin point the line or paragraph that led you to your conclusion.

thanks
ASKER CERTIFIED SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jomfra

ASKER

hello tintin

thanks for explanation and the relevant method how move users

keep up the good work