Data source for env command

Please advice why when I login as a root and start env command I have 40 lines output, but I don't have there JAVA_HOME. Each time when I restart server I have to rebuild
JAVA_HOME=/usr/java
export JAVA_HOME
because after rebooting it's disappear from env output.
As I understand, all root's environment information has to be stored into /.profile, but this file doesn't exist.
When I try
find / -name ".profile*"
system found only 3 ./skel/.profiles but no one real
How to modify root's .profile file and put there JAVA_HOME permanently
gbcbrAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gerwin Jansen, EE MVETopic Advisor Commented:
Hi, try creating /.profile and put these 2 lines in there:
JAVA_HOME=/usr/java
export JAVA_HOME

Open in new window

0
gbcbrAuthor Commented:
Sorry, you don't understand my question.
The question is FROM WHERE going now env OUTPUT CONTENT?
0
Gerwin Jansen, EE MVETopic Advisor Commented:
No need to shout... What is your root's home directory and what .* files are in there? What output do you get from:
ls -1d ~/\.*

Open in new window

0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

gbcbrAuthor Commented:
bash-3.00# ls -ld ~/\.*
drwxr-xr-x  51 root     root          61 Dec 25 21:37 //.
drwxr-xr-x  51 root     root          61 Dec 25 21:37 //..
drwx------   3 root     root           3 Aug 24 11:09 //.adobe
-rw-------   1 root     root        9628 Dec 25 21:25 //.bash_history
drwx------   3 root     root           3 Aug 24 11:22 //.config
drwxr-xr-x   9 root     root          12 Dec 25 21:37 //.dt
-rwxr-xr-x   1 root     root        5111 Aug 24 08:58 //.dtprofile
drwx------   4 root     root           4 Dec 25 21:37 //.gconf
drwx------   2 root     root           3 Dec 25 22:26 //.gconfd
drwx------   4 root     root           4 Aug 24 08:58 //.gnome
drwx------   8 root     root          38 Dec 25 21:37 //.gnome2
drwx------   2 root     root           2 Aug 24 08:58 //.gnome2_private
drwxr-xr-x   2 root     root           3 Aug 24 09:36 //.gstreamer-0.8
-rw-r--r--   1 root     root          77 Aug 24 08:58 //.gtkrc-1.2-gnome2
-rwx------   1 root     root           0 Aug 31 12:17 //.hpshm_keyfile
-rw-------   1 root     root        5660 Dec 25 21:37 //.ICEauthority
drwx------   2 root     root           3 Aug 24 08:59 //.icons
drwx------   3 root     root           3 Aug 24 08:58 //.iiim
drwxr-xr-x   4 root     root           4 Oct 23 14:32 //.java
drwxr-xr-x   7 root     root          12 Aug 31 17:59 //.jedit
drwx------   3 root     root           3 Aug 24 11:09 //.macromedia
drwx------   3 root     root           3 Aug 24 08:58 //.metacity
drwx------   6 root     root           9 Oct 23 18:51 //.mozilla
drwxr-xr-x   3 root     root           4 Aug 24 08:58 //.nautilus
drwxr-xr-x   7 root     root           8 Aug 24 15:38 //.nbi
drwxr-xr-x   3 root     root           4 Aug 24 15:38 //.netbeans
-rw-------   1 root     root       10147 Dec 25 21:13 //.recently-used
drwxr-xr-x   3 root     root           3 Aug 24 08:58 //.softwareupdate
drwx------   3 root     root           3 Aug 24 01:54 //.sunw
drwx------   3 root     root           3 Aug 24 09:36 //.thumbnails
-rw-------   1 root     root         149 Dec 25 21:37 //.Xauthority
bash-3.00#

Open in new window

0
Gerwin Jansen, EE MVETopic Advisor Commented:
Ok, you're using bash, easiest if you just create a file ~/.bashrc and put these 2 lines in there:
JAVA_HOME=/usr/java
export JAVA_HOME

Open in new window

Your existing root profile is probably in /etc/skel/.profile (not profiles).
0
gbcbrAuthor Commented:
1. I use bash only for my convenience, original is sh;
2. /etc/skel/.profile is empty;
3. I 'm looking not for easiest way, but for proper, I need to find the file which store root environment, like I have for oracle user and I can modify it.
0
Duncan RoeSoftware DeveloperCommented:
The environment is in memory. When a process starts, it inherits (a copy of) the environment of its parent process. Any process may add or remove items from its environment. Typically that is done by commands in a script like ~/.profile.
When the system boots, it creates the initial process (init, PID=1) with a very basic environment (3 lines from memory). At login time, you don't inherit much more, but usually items are added by /etc/profile which sh or bash will source if started as a login shell.
You can tell whether your shell is a login shell by looking at how it was invoked - there will be a hyphen at the front if it was. This is the test that the shell uses to decide whether to source /etc/profile. For instance
12:40:04$ echo $0
-bash
12:49:13$ bash
12:52:03$ echo $0
bash
12:52:09$ exit
exit
12:52:13$ echo $0
-bash
12:52:30$ 

Open in new window

My initial bash is a login shell. If I start another bash shell, that one is not.
It is quite common that /etc/profile acts quite differently for root than it does for all other users - have a look at yours.
0
Duncan RoeSoftware DeveloperCommented:
bash will only source ~/.bashrc if not started as a login shell. Login bash will source ~/.bash_profile if it exists else ~/.profile (same as sh). Usually these scripts are written to source ~/.bashrc as the last thing they do, if it exists.

Hope this is what you are looking for - please post if you'd like extra clarification of anything
0
gbcbrAuthor Commented:
I make this test
# echo $0
sh
# bash
# echo $0
bash
# exit
exit
# echo $0
sh
#

Open in new window

Means that my system starts in sh not in bash, so where I can find root env profile?
0
Duncan RoeSoftware DeveloperCommented:
Probably /etc/profile as I mentioned earlier. It doesn't look like your sh is a login shell though, otherwise echo $0 should give you -sh (i.e. starts with a hyphen). It depends what software started sh - if you try from a console then you should see the hyphen. Usually you can get a console from Ctrl-Alt-F6 (Ctrl-Alt-F7 gets back to your X session).
0
gbcbrAuthor Commented:
I'm specially, because of Sunday, restart my server and login as root.
This is first what I get from terminal:
# echo $0
sh
# find / -name ".profile"
find: stat() error /proc/893/fd/5: No such file or directory
/etc/skel/.profile
/export/skel/oracle/.profile
/export/skel/weblogic/.profile
/export/home/oracle/.profile
/export/home/weblogic/.profile
/var/sadm/pkg/SUNWcsr/save/pspool/SUNWcsr/reloc/etc/skel/.profile
#

Open in new window

and the same huge env output.
Please advise which files I have to try to find, so finally I can edit it
0
Duncan RoeSoftware DeveloperCommented:
There is no dot in /etc/profile. That is the file you want to examine.
0
gbcbrAuthor Commented:
And what to do with this script?
# cat /etc/profile
#ident  "@(#)profile    1.19    01/03/13 SMI"   /* SVr4.0 1.3   */

# The profile that all logins get before using their own .profile.

trap ""  2 3
export LOGNAME PATH

if [ "$TERM" = "" ]
then
        if /bin/i386
        then
                TERM=sun-color
        else
                TERM=sun
        fi
        export TERM
fi

#       Login and -su shells get /etc/profile services.
#       -rsh is given its environment in its .profile.

case "$0" in
-sh | -ksh | -jsh | -bash)

        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
#

Open in new window

0
Duncan RoeSoftware DeveloperCommented:
Doesn't do a lot, does it? I hadn't realised this is SOLARIS, right? So root's home directory is / ?
Some file has to be setting your environment variables. Pick a distinctive string from your env and search for it
find /etc -type f|xargs grep distinctive_string

Open in new window

where distinctive_string is some name from the output of env (such as JAVA_HOME, but pick one you actually have).
0
gbcbrAuthor Commented:
very strange, in /etc doesn't exist file with ORACLE_HOME
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
GTK_IM_MODULE=iiim
G_BROKEN_FILENAMES=yes
dtstart_sessionlogfile=/dev/null
COLORTERM=gnome-terminal
_=/usr/bin/env
# find /etc -type f|xargs grep LOGNAME
/etc/mail/cf/sh/makeinfo.sh:    user=$LOGNAME
/etc/skel/.profile:MAIL=/usr/mail/${LOGNAME:?}
/etc/uucp/Permissions:# LOGNAME=Usun MACHINE=sun VALIDATE=sun COMMANDS=rmail REQUEST=yes SENDFILES=yes
/etc/profile:export LOGNAME PATH
# find /etc -type f|xargs grep ORACLE_HOME
# find /etc -type f|xargs grep ORACLE_SID
#

Open in new window

0
Duncan RoeSoftware DeveloperCommented:
Looks like we need t try find / in that case. Will take a while...
0
Duncan RoeSoftware DeveloperCommented:
Other possibility is to truss a getty during a login, if you can engineer that
0
gbcbrAuthor Commented:
>>Other possibility is to truss a getty during a login, if you can engineer that

??

0
Duncan RoeSoftware DeveloperCommented:
man truss tells you about truss, if you have it. It can print all the system calls made by a process. A getty waits for you to log in on a console or serial line - the telnet daemon might be just as good for the purpose.
If all this means nothing to you, forget it and carry on with the big find / grep
0
gbcbrAuthor Commented:
Why it's so complicated procedure just to find source file for the root profile?
Maybe really better create new .profile file and put there all necessary arg, but where to locate it to be readable during logging?
0
Duncan RoeSoftware DeveloperCommented:
You posted in http:#a37336306 that you wanted to know. So let's find out
0
gbcbrAuthor Commented:
When I try to search # find /etc -type f|xargs grep ORACLE_HOME
I have this huge output and terminal stacks, so I have to close it
# find / -type f|xargs grep ORACLE_HOME
/core:ORACLE_HOME_DETAILS_DESC=<p> The Oracle home location that you specify will be used for cloning the existing Oracle home.<p>
/core:ORACLE_HOME_NAME=Oracle Home Name
/core:CLONE_EXISTING_ORACLE_HOMES=Existing Oracle Homes
/core:ORACLE_HOME_CREDENTIALS=Oracle Home Credentials
/core:ORACLE_HOME_DETAILS_DESC1=<p> Enter a location that is empty and has write permissions.</p>
/core:TARGET_ORACLE_HOME=Oracle Home
/core:ORACLE_HOME_DETAILS=Details for Clone Oracle Home
/core:CLONE_NEW_ORACLE_HOME=New Oracle Home
/core:ORACLE_HOME_LOC=Oracle Home Location
/core:FIND_TARGET_ORACLE_HOME_NAME=Oracle Home Name
/core:ORACLE_HOMES=Oracle Homes
/core:MULTIPLE_ORACLE_HOME_TOOLTIP=Only Oracle Homes associated with Support Identifiers in your profile are shown.
/core:MULTIPLE_ORACLE_HOME_NOTICE=Note: The list of Oracle Homes is limited by the Support Identifiers in your profile.
/core:MULTIPLE_ORACLE_HOME_TITLE=Oracle Homes on {0} ({1})
/core:ORACLE_HOME=Oracle Home
/core:PATCH_ORACLE_HOME_ONLY={0} (Oracle Home on Host {1})
/core:SHOW_ALL_ORACLE_HOMES=View All {0} Homes
/core:PATCHES_ORACLE_HOME={0} (Oracle Home on Host {1}) - {2} Issues
/core:SRCTIP_DBCRASH=For improved results, check the .trc file in $ORACLE_HOME/rdbms/log for errors and include these in your search terms.
/core:PATCH_ORACLE_HOME={0} (Oracle Home on Host {1}) - {2} Issue
/core:FIND_TARGET_ORACLE_HOME_NAME_PROMPT=for Oracle Home name
bHeadlineOnly_247524032statusDate_138417886bHeadlineOnly7oracle.sysman.csp.flex.app.config.model:ConfigSummaryVO
                                 ORACLE_HOME_622407208supportIdentifierm_lastUpdatedMilli_958911557is_active
                              displayType_1717847875informationCount_1588450207deploymentType_901264230root_target_guidroot_target_nameinformationCount_900872885root_target_typeroot_target_typeroot_target_guid_1573937402metalinkId_14criticalCount_812504240criticalCountmetalinkEmailId!_1329686049root_target_ua_enabledisUpdatingProject_80146712internalName_1714350876displayType_86371668lastUpdatedStr
           warningCount_2125324968metalinkEmailId_2042096941warningCountroot_target_ua_enabled_1272470629dataSource_1575128471isUpdatingProject
                                                                   internalName_901074788root_target_name_920449792ORACLE_HOME
/core:TYPE_PATCHFinding IS_SYSTEMCREATE_COMMANDROOT_TARGET_GUID_CONTEXTSUPPRESS_ACTION_UNSUPPRESS¿¿+¿-¿S¦¿¿¿¿¿¿¿¿+
                                    MODE_CONTEXTIFRAME_CONTEXT¿°¿¦+¿UDA_CORES_CUPDATED_TABLEFILTER_SUMMARY_CONTEXTUDA_SERIALNO_CONTEXTOFFLINE_CONTEXTofflineGET_USER_LIST_BY_CSI_COMMAND     SR_REPORTASC_SORT_CONTEXTascSortLANG_NAME_GREEK¿¿¿¿¿¿¿¿ROOT_TARGET_UA_ENABLED_CONTEXT
                                       GET_COMMANDTARGET_PLAN_UPGRADE_CONTEXTtargetPlanUpgrade
               NOT_UPDATEDSR_VERSION_CONTEXTGROUP_ORDER_BY_DIR_ASC    ascendingINSTALL_UPGRADE_PAGEFAVORITES_TYPE_CERTIFY_SEARCHCERTIFY_SEARCH       ROOT_NODEKM_PREFERENCESSEARCHED_SOURCES_NODESEARCHED_SOURCESDUMMY_DATA_TAG<D¦++=D¦+¦></D¦++=D¦+¦>LANG_NAME_ENGLISHCATEGORY_CONTEXTPROJECT_NUMBERORACLE_HOME_CONTEXTORDERBY_CONTEXTorderbySR_TYPE_VISIBILITY
/core:getFullURLgetServerNameWithPortreplaceProtocol   urisEqual
                                                                 getProtocolintereplaceTokensSERVER_NAME_REGEXgetPort¿+¿¿+±T¿O¿+¿¿+
                                                    ¿¿¿+¦¿¿P¿¿+ ¿¿H++¿URLSERVER_p¿¿¿-¿¿.¿¿¿+£FUNCTION_MOVEIFRAMEFUNCTION_HIDEDIVFUNCTION_BRING_IFRAME_TO_FRONTINSERT_FUNCTION_PRINT_IFRAME"INSERT_FUNCTION_CALLIFRAMEFUNCTIONFUNCTION_PRINT_IFRAMEINSERT_FUNCTION_CREATEIFRAMEFUNCTION_CREATEIFRAMEFUNCTION_SHOWIFRAMEINSERT_FUNCTION_REMOVEIFRAMEFUNCTION_HIDEIFRAMEINSERT_FUNCTION_HIDEIFRAMEFUNCTION_UNCTION_CALLIFRAMEFUNCTIONINSERT_FUNCTION_SHOWIFRAME FUNCTION_ASK_FOR_EMBED_OBJECT_ID¦¿+F¿¿E+¿¿¿O¿+¿¿+I¿INSERT_FUNCTION_SHOWDIVINSERT_FUNCTION_HISTORY_FORWARD+INSERT_FUNCTION_SETUP_RESIZE_EVENT_LISTENERINSERT_FUNCTION_LOADIFRAMEFUNCTION_LOADIFRAMEINSERT_FUNCTION_LOADDIV_CONTENT%INSERT_FUNCTION_BRING_IFRAME_TO_FRONTINSERT_FUNCTION_HIDEDIVFUNCTION_HISTORY_BACKINSERT_FUNCTION_HISTORY_BACKFUNCTION_SHOWDIV*INSERT_FUNCTION_GET_BROWSER_MEASURED_WIDTHFUNCTION_HISTORY_FORWARD#FUNCTION_GET_BROWSER_MEASURED_WIDTHINSERT_FUNCTION_MOVEIFRAME$FUNCTION_SETUP_RESIZE_EVENT_LISTENER¿¿+¦¿R¿¿¿=¿E-¿++L¿¿+¿+¿¿FUNCTION_LOADDIV_CONTENT'INSERT_FUNCTION_ASK_FOR_EMBED_OBJECT_ID#INSERT_FUNCTION_IFRAME_POSITION_FIX)INSERT_FUNCTION_SET_IFRAME_FOCUS_LISTENERFUNCTION_FOCUS_ON_IFRAME
                                               °¿¿¦¿O+F¿¦+¿INSERT_FUNCTION_FOCUS_ON_IFRAME
UNCTION_SET_IFRAME_CONTENT"INSERT_FUNCTION_SET_IFRAME_CONTENT
                                                             ¿¿¿¿IF¿¦+¿2FUNCTION_IFRAME_POSITION_FIX¿°¿¦+¿F¿¦P¿¿¿+¿¿+"FUNCTION_SET_IFRAME_FOCUS_LISTENER¿¿+I°¿¦+¿F¿¿¦¿L¿¿+¿+¿¿
               +¿-¿IF¿¦+¿2MAX_NUMSTATE_SYSTEM_FOCUSABLE
                                                        CANCEL_EVENT¿¦+¿¿+D¦+¿S¿+¿¿+¿¿+¿¿¦¿S¿¦¿¿¿¿F¿¿+XML±¿+I¿¿+F¿¿S¿¦¿¿¿SEARCH_ALL_SOURCESCUSTOMER_PARTNUMBER_SEARCH_URLPARTNER_PARTNUMBER_SEARCH_URL+_¿¦±R¿+¿¦¿¿¿A++_743500571+_¿¦±S=¿C¿¿+_¦++S+¦+¦¿¿¿_1045661681+_¦++S+¦+¦¿¿¿_1694061491+_¿¦±R¿+¿¦¿¿¿A++_479231110+_¿¦+_¿¦±S=¿C¿¿¿¿_131070434+_¿¦±S+¦+¦¿¿¿_594093151+_¿¦±S+¦+¦¿¿¿A++¿_¿¿+¿F¿+¿R¿+¦¿+¿¿
XPORT_DIFF_METRICS_COMMAND¿¦¿¿¿+M¿+¿¿¿D¿°°D¦+¦EXPORT_METRICS_COMMAND¿¦¿¿¿+M¿+¿±¿+A++C¿+°¿±¿L_CONFIGS_COMMAND
             COMPARE_ALLGET_METRIC_HISTORY_COMMAND±¿+M¿+¿¿¿H¿¿+¿¿=D¿+¦¿+¿D¦+¦SERVICE_FETCH_ROLE_PERMISSIONSEXPORT_TITLE_NOTEexportTitleNoteUI_ROW_NUM_CONTEXuiRowNumSERVICE_FETCH_CONFIG_PRODSSERVICE_DEACTIVE_CONFIGSERVICE_FETCH_DISCOVERED_PRODSCOMPARE_CONTEXTORACLE_HOME_TYPECOMPARE_CHANGEDCOMPARE_STATE_DIFFERENTSUPERUSER_VALIDATE_CSI_COMMANDTARGET_TIME1_CONTEXTtime1TARGET_TIME2_CONTEXTtime2SERVICE_FETCH_COMPARE_SUMM!GET_TARGETS_BY_ANNOTATION_COMMANDgetTargetsbyAnnotationSERVICE_FETCH_CONFIG_HISTORYGET_DISCOVERED_PRODSgetOCMCollectedProdsSERVICE_FETCH_CONFIG_CXTCHANGE_HISTORY_CONTEXT
/core:chgHistoryCLASSIFICATION_CONTEXTSIEBEL_ENTERPRISE_SYSTEMEXPORT_HISTORY_METRICS_COMMANDexportMetricHistoryDataSERVICE_FETCH_TARGET_LISTSERVICE_FETCH_TARGETSERVICE_SET_PROPERTIESTARGET_DIFF_CONTEXTcflagSERVICE_FETCH_ALL_CONFIGSSIEBEL_GATEWAY_SYSTEMsiebel_gateway_systemGET_METRIC_COMPARE_COMMANDgetMetricCompareDetailsDataSERVICE_UPDATE_CONFIGSERVICE_TARGETS_BY_ANNOTATIONGET_ORACLE_HOME_LIST_COMMANDgetOracleHomeListCOMPARE_ONLY_DIFFSdiffGET_SYSTEM_COMMAND    gexpandedGuidsCOLLAPSE_ALL_EVENTSERVICE_ACTIVATE_CONFIGSET_TARGET_LIFECYCLE_COMMANDsetLifecycleTargetSERVICE_GET_IS_UPGRADE_ENABLEDTARGET_METRIC_CONTEXTSERVICE_FETCH_CHG_HIST_SUMMSUPERUSER_ADD_CSI_COMMANDMANAGE_DEACTIVATEDmanageDeactiselectedTableVALUES_CONTEXTGET_MEMBER_COUNT±¿+T±+M¿+¿¿¿C¿¦++SET_SYSTEM_LIFECYCLE_COMMAND¿¿+L¿°¿¿=¿+¿S=¿+¿+SHOW_ANNOTATION_CONTEXTshowAnnotationsGET_METRICS_COMMANDUSER_DEF_PRODS¦¿¿¿D¿°¿+¿¿P¿¿¿¦¿+¿CSI_LIST_CONTEXT¿¿¿CSVSERVICE_SEARCH_ORGTARGET_RESULTSID_CONTEXT    ¿¿¿¦++¿I¿GET_CONFIG_HISTORY_COMMAND±¿+H¿¿+¿¿=S¦++¦¿=D¦+¦SERVICE_UPDATE_TARGETGET_HISTORY_SUMMARY_COMMANDSERVICE_VALIDATE_CSIVALUE_CONTEXTORACLE_APPS_DB¿¿¦¿+¿_¦¿¿¿_¿¿SETACTIVE_COMMAND     ¿¿+A¿+¿-¿IS_UPGRADE_ENABLED_COMMAND¿¿U¿±¿¦¿¿E+¦¿+¿¿ACTIVE_CONTEXTORACLE_BI_ANS_SYSTEM¿¿¦¿+¿_¿¿_¦+¿_¿=¿+¿+GET_TGT_METADATA_COMMAND
                                    ±¿+M¿+¦D¦+¦SUPERUSER_REMOVE_CSI_COMMAN¿¿¿¿+CSIGET_TARGETS_COMMAND
(\¿+)+(¿¦+¿¿)±¿+¦(¿¦+¿¿)+(\¿+)+(\¿+)$1$2<¦ ¿¿¿°='¿-¿++:$3'>+<¦><°¿++ ¿¿+¿¿='0¦0000DD'>$3</°¿++></¦></¦><¦><°¿++ ¿¿+¿¿="#000099"><B><¦></¦></B></°¿++></¦>KB_SOME_RESULTS_SHOWNCFY_SORT_DISABLED¿¿¿L¿¿+.¿+¿¿¿C¿¿+¿°¿¿¦+¿¿+ORACLE_LIFETIME_ND_DATE_SUSTAINING_SUPPORTORACLE_SUPPORT_POLICY*_RetirementInfoVisual_NavigableLabel1.text*_RetirementInfoVisual_NavigableLabel2.text)_RetirementInfoVisual_NavigableText1.text*_RetirementInfoVisual_NavigableLabel3.text)_RetirementInfoVisual_NavigableText2.text*_RetirementInfoVisual_NavigableLabel4.text)_RetirementInfoVisual_NavigableText3.text*_RetirementInfoVisual_NavigableLabel5.text)_RetirementInfoVisual_NavigableText4.text*_RetirementInfoVisual_NavigableLabel6.text-_RetirementInfoVisual_ClickableLinkText1.text0_RetirementInfoVisual_ClickableLinkText1.toolTiplast_visit_date
                 HEIGHT_LABEL
                             UNITS_LABEL+_CertifyActivityEditor_NavigableLabel1.text+_CertifyActivityEditor_NavigableLabel2.textKB_NO_RECENT_SEARCHESCERTIFICATIONSCERTIFY_TAB_RECENT_DMS_SEARCHES¿¿¿¿++C¿¿+S¿¦¿¿¿¿¿.+¦¿¿+¿¿¿¿++DMSS¿¦¿¿¿¿¿.+¦¿¿+C¿++¦¿+P¿¿+¿¿¿¿¿+¿
                     C¿++¦¿+R¿+¿¿SYSTEMSTARGETSAnnotatedTargetCONFIGURATION_UPDATEDSELECT_A_TARGETPLAN_AN_UPGRADEenableannotationPageActionsPLAN_AN_UPGRADE_TIHOME_LOCATIONRADE_DISABLED
             ORACLE_HOMES(\d{2})-(\w{3})-(\d{2})CONFIG_COMPARE_MENU
/core:TYPE_LABELLAST_COLLECTEDMULTIPLE_ORACLE_HOME_TOOLTIPSOURCE_OF_COLLECTIONNEED_TO_UPGRADEeditButton.labeldeactivateConfigButton.labelattributeDisplay.verticalGap%_TargetOverviewVisual_FormItem1.label%_TargetOverviewVisual_FormItem2.label%_TargetOverviewVisual_FormItem3.label%_TargetOverviewVisual_FormItem4.labelhostFormItem.labelinfoButton.toolTip%_TargetOverviewVisual_FormItem7.label%_TargetOverviewVisual_FormItem8.labeldeployment_type.dataproviderdeployment_type.selectedItem%_TargetOverviewVisual_FormItem9.labelneed_to_upgrade.text$snapshotSelector.firstCollectionDate¿¿¿¿=¿+¿.+¦¿¿+WHATCOMPARE_DIFFERENCECOMPARE_WHAT_DIFFERENTVALUE1VALUE2WHENPREVIOUS_VALUE    NEW_VALUE¿¿¿M¿+¦I¿L¦+¿¿+S¿¿-+¿¿¿M¿+¦I¿C¿+¿¦¿¿¿¿¿M¿+¦I¿C¿¦+±¿H¿¿+¿¿=
                             ¿¦+¿P¿¿+¿¿2
                                        ¿¦+¿P¿¿+¿¿3OUT_OF_COLLECTION_RANGE_LINKFROM_DATE_OUT_OF_RANGETO_DATE_OUT_OF_RANGETO_DATE_OUT_OF_RANGE_LINK   LATEST_TOSINCE¿¿¿¿¿¿¿¦ +¿+¦L¦¿¿+datesCommitted2        strLastettdrastrLastetChgHisttdrddatesCommitted3handleDateSelectorCanceledHISTORICAL_SNAPSHOTLATEST
NOT_REQUESTEDMERGE_REQUEST_TYPES_resolution_text20-
                                                     SEVERITY_MSGARU_CONFLICT_REQUEST_BASEARU_DETAILS_MSG_WITH_IDARU_BASE_NO_VALIDATIONUPGRADE_COLLECTOR_TO_MSGUPGRADE_COLLECTOR_EM_MSGconflictSetListbackportRequestListcheckApplicabilityListPLAN_BACKPORT_SETPATCH_APPLICABILITY_SETPATCHES_APPLICABILITY_SETPATCHES_CONFLICT_SETPATCH_CONFLICT_SETPATCHES_ORACLE_HOMEPATCH_ORACLE_HOMEGSUPPORT_LEREAPPLY_PATCH
FROM_TEMPLATECONFLICT_PATCH     FROM_PLAN
             PREREQ_PATCH
NOT_VALIDATEDPARTIALLY_CONFLICT_FREEPATCH_VALIDATION_STATUS_NOT_IN_RECOMMENDATION_LISTNOT_RECOMMENDEDALREADY_APPLIEDPATCH_REMOVAL_PLAN_LIST_STATUS_C¿+°+¿¿+A¿+¿-¿+=C¦++¿¦+MERGE_PATCH_AVAILABLEMERGE_PATCH_REQUESTED       REQUESTEDP+¦+C¦++¿¦+T¦¿+¿
         MORE_DETAILSPLAN_RETRY_REQUEST_BTNREPLACE_MERGE_PATCH_BTNPLAN_REQUEST_ALL
/¿¿¿¿:TARGET_RACCLUSTERTARGET_ORACLE_HOME
                                          TARGET_HOSTTARGET_LISTENER
                                                                    TARGET_AGENT
addKeyColumnscustomAttributeDisplay
                                    wasEditable
                                               toAttributescontrolNot SetSR_NUMBER_ERROR
       numValidatorcBoxtInputSHOW_ALL_ORACLE_HOMESMULTIPLE_ORACLE_HOME_TITLEshowAll.fontSizeCOMP_CSV_STATUS_ADDEDCOMP_CSV_STATUS_REMOVEDCOMP_CSV_STATUS_CHANGEDCOMP_CSV_STATUS_SAMDateBase+¿++¿N¦+¿¿L¿+±±¿+D¦=
                                                      ¿¦=N¦+¿¿L¿+±\¿\WUTCUTGMTESTEDTCSTCDTMSTMDTPSTPDT
                                  I+-¦+¿¿ D¦+¿%T¿¿¿ ¿¦+¿ ¿¿¿¿ +¿+ ¿¿+°¿¿+ +¿ RFC822.U+¦¿+¿ +¿ ¿¦¿¿¿ +¿¿ ¿+¿¿+± [] into a date. The internal error was:
/core:UnsubscibeFROMSUBJECTCONTENT
                                   POST_MESSAGE#_HCReviewPanel_NavigableLabel1.text#_HCReviewPanel_NavigableLabel2.text#_HCReviewPanel_NavigableLabel3.text¿¦¿+¿¿+.¿¿¿+¿+
       ¿¿¿=.¿¿¿+¿+¦¦+¿S¦¿¿¿¿¿¿¿.+¦¿¿+¦¦+¿S¦¿¿¿¿¿¿¿.¿¿+¿¿+¿¿¿¦+¿¿+B¦++¿+.+¿¦+CERTIFICATION_ERROR_DETAIL18
                            PLAN_DEPLOYPLAN_PREDEPLOYCONFLICT_PATCH_STATUS_ARU_MORE_DETAILS_MSGUPGRADE_COLLECTOR_MSGUPGRADE_AGENT_MSGREVALIDATE_PLANPLAN_STATUS_NEVER_PATCHPLAN_STATUS_NEVER_UPGRADneverRunPLAN_STATUS_PRE_DEPLOY_CLEAanalysisPLAN_STATUS_DEPLOY_CLEANPLAN_STATUS_ISSUESPLAN_REVIEW_SUCCESS_EMPLAN_STATUS_CLEAN_PATCHPLAN_STATUS_CLEAN_UPGRADEREPLACEMENTS_AVAILABLE

Open in new window

0
Duncan RoeSoftware DeveloperCommented:
GNU grep would report core: Binary file matches or something similar, but antiquated Solaris grep is too dumb to do that.
Send output to a file and peruse the file afterward - less -S will inhibit line wrapping for instance.
find / -type f | xargs grep -n ORACLE_HOME >orahome.out

Open in new window

You could try adding -name '*profile*' to your find command although that may miss the file we want.
If your grep accepts -w for word match, that should cut down the output a lot
0
Duncan RoeSoftware DeveloperCommented:
You may have GNU grep - it will likely be called ggrep if you do
0
gbcbrAuthor Commented:
>>find / -type f | xargs grep -n ORACLE_HOME >orahome.out

finds nothing

'*plofile*' - find all profiles, but no one with root parameters
0
Duncan RoeSoftware DeveloperCommented:
root shells must inherit from their parent then. Either that or we are up against real mysteries - encrypted binaries, Unicode text strings and the like. Under Linux, I would cd to /proc and examine process environments
11:25:45# cd /proc
11:27:39# # init's environment is very short
11:28:00# cat 1/environ|xargs -0 -n1 echo|sort
BOOT_IMAGE=v2.6.34
HOME=/
TERM=linux
11:28:05# # Any GUI program will inherit the environment of the X server
11:29:33# ps ax|grep -w X
 1950 tty7     Ss+   17:12 X -auth /home/dunc/.Xauthority -terminate
12128 pts/13   S+     0:00 grep -w X
11:29:42# cat 1950/environ|xargs -0 -n1 echo|sort
C= *.c *.h make-file
CC=gcc
CPLUS_INCLUDE_PATH=/usr/lib/qt/include:/usr/lib/qt/include
CVSROOT=:pserver:duncan@www2.dfa.com.au:/dfa
EDITOR=q
EXINIT=se showmode number ai
FC=g77
GDK_USE_XFT=1
G_BROKEN_FILENAMES=1
HOME=/home/dunc
HOSTNAME=dimstar.local.net
HUSHLOGIN=FALSE
HZ=100
INFOPATH=/usr/info:/sdb3/teTeX/info
INPUTRC=/etc/inputrc
JAVA_HOME=/usr/lib/java
L= /home/dunc/lines
LANG=C
LESS=-X -Ps More
LESSOPEN=|lesspipe.sh %s
LINUXDOCLIB=/usr/lib/linuxdoc-sgml
LINUX_SUBLEVEL=23
LOGNAME=dunc
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.bat=01;32:*.BAT=01;32:*.btm=01;32:*.BTM=01;32:*.cmd=01;32:*.CMD=01;32:*.com=01;32:*.COM=01;32:*.dll=01;32:*.DLL=01;32:*.exe=01;32:*.EXE=01;32:*.arj=01;31:*.bz2=01;31:*.deb=01;31:*.gz=01;31:*.lzh=01;31:*.rar=01;31:*.RAR=01;31:*.rpm=01;31:*.tar=01;31:*.taz=01;31:*.tb2=01;31:*.tbz2=01;31:*.tbz=01;31:*.tgz=01;31:*.tz2=01;31:*.z=01;31:*.Z=01;31:*.zip=01;31:*.ZIP=01;31:*.zoo=01;31:*.asf=01;35:*.ASF=01;35:*.avi=01;35:*.AVI=01;35:*.bmp=01;35:*.BMP=01;35:*.flac=01;35:*.FLAC=01;35:*.gif=01;35:*.GIF=01;35:*.jpg=01;35:*.JPG=01;35:*.jpeg=01;35:*.JPEG=01;35:*.m2a=01;35:*.M2A=01;35:*.m2v=01;35:*.M2V=01;35:*.m4a=01;35:*.M4A=01;35:*.m4p=01;35:*.M4P=01;35:*.m4v=01;35:*.M4V=01;35:*.mov=01;35:*.MOV=01;35:*.mp3=01;35:*.MP3=01;35:*.mpc=01;35:*.MPC=01;35:*.mpeg=01;35:*.MPEG=01;35:*.mpg=01;35:*.MPG=01;35:*.ogg=01;35:*.OGG=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.PNG=01;35:*.ppm=01;35:*.ram=01;35:*.RAM=01;35:*.rm=01;35:*.RM=01;35:*.tga=01;35:*.TGA=01;35:*.tif=01;35:*.TIF=01;35:*.tiff=01;35:*.TIFF=01;35:*.wav=01;35:*.WAV=01;35:*.wma=01;35:*.WMA=01;35:*.wmv=01;35:*.WMV=01;35:*.xbm=01;35:*.xcf=01;35:*.xpm=01;35:*.xwd=01;35:*.XWD=01;35:
LS_OPTIONS=-F -b -T 0 --color=auto
MAIL=/home/dunc/Maildir
MANPATH=/usr/local/man:/usr/man:/usr/lib/java/man:/var/qmail/man:/usr/share/texmf/man
MINICOM=-c on
PAGE=A4
PAGER=less
PATH=/home/dunc/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/lib/qt/bin:/usr/lib/qt/bin:/usr/share/texmf/bin:/usr/local/sbin:/usr/sbin:/sbin
PGPPATH=/home/dunc/.pgp
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
PWD=/home/dunc
QT4DIR=/usr/lib/qt
QTDIR=/usr/lib/qt
Q_HELP_CMD=k
Q_HELP_DIR=/usr/q
SHELL=/usr/bin/bash
SHLVL=3
SVGALIB_DEFAULT_MODE=1024x768x256
SYBASE=/opt/sybase
T1LIB_CONFIG=/usr/share/t1lib/t1lib.config
TERM=linux
USER=dunc
VISUAL=q
WINDOW_MANAGER=metacity
XAUTHORITY=/home/dunc/.Xauthority
XDG_CONFIG_DIRS=/etc/xdg:/etc/xfce/xdg
_=/usr/bin/X
11:30:07# 

Open in new window

A Linux proc environment file has entries separated by NUL characters (0x00). The xargs gymnastics convert these NUL characters to normal end of line, allowing a viewable display.
Provided Solaris /proc also has each process's environment in some file, you can do something similar on your system. If you X server has ORACLE_HOME, we have the explanation we were seeking. Otherwise, keep digging
0
gbcbrAuthor Commented:
Looks like some difference between Linux and Solaris
# cd /proc
# ls
0      14998  20119  20141  20313  21487  21509  229    29681  369    429    4583   4655   4691   5027   675    898
1      15109  20121  20143  20315  21489  21646  25481  3      371    430    4586   4657   4693   5107   687    9
10995  15167  20123  20183  20339  21491  21650  25483  3434   373    437    4587   4659   4695   5140   696    900
11     16191  20125  20189  20361  21493  21655  25485  354    374    438    4588   4674   4697   5149   714    902
11142  2      20127  20203  21246  21495  21657  27108  355    375    4503   4621   4676   4720   520    740    92
112    20105  20129  20205  21455  21497  21659  27938  358    376    451    4623   4678   4721   6362   742
1142   20107  20131  20213  21464  21499  21661  28206  361    377    452    4625   4680   4724   6363   743
136    20111  20133  20241  21479  21501  21663  28652  362    379    4527   4638   4681   4746   6364   80
137    20113  20135  20250  21481  21503  21665  28754  363    381    453    4640   4683   480    6490   818
139    20115  20137  20252  21483  21505  21667  28948  364    407    4546   4650   4687   497    661    893
140    20117  20139  20285  21485  21507  218    29666  365    412    4582   4652   4689   5      672    895
# cat 1/environ | xargs -0 n1 echo | sort
cat: cannot open 1/environ
xargs: illegal option -- 0
xargs: Usage: xargs: [-t] [-p] [-e[eofstr]] [-E eofstr] [-I replstr] [-i[replstr]] [-L #] [-l[#]] [-n # [-x]] [-s size] [cmd [args ...]]
# cd /proc/1
# ls
as         cred       fd         lstatus    map        path       rmap       status     xmap
auxv       ctl        ldt        lusage     object     priv       root       usage
contracts  cwd        lpsinfo    lwp        pagedata   psinfo     sigact     watch
#

Open in new window

0
Duncan RoeSoftware DeveloperCommented:
Yes, Solaris is past its use-by date. I thought they distributed a directory of GNU utilities as standard - they would help you a bit. Are any of the entries in /proc directories? They might still contain the environment. Otherwise you're out of luck with that.
0
Duncan RoeSoftware DeveloperCommented:
The -0 option of GNU xargs causes it to expect NUL separated entries. GNU find has a matching print0 action. Very neat - gets around horrid Windows file names containing spaces and other garbage
0
gbcbrAuthor Commented:
OK, I suppose we try to track all places. Tell me where to place new created .profile for root, so I can manage it and it will be used for the environment loading, when system will restart.
0
Duncan RoeSoftware DeveloperCommented:
Well actually I dunno. You could try placing a file in root's home directory (/ on Solaris it seems) called .profile and see if environment settings are picked up from it although I rather doubt they will be. As a test, it could contain
DISTINCTIVE_VAR=xxxx
export DISTINCTIVE_VAR

Open in new window

See if new root terminal windows pick this up. Failing that, reboot and try again. Post if no luck
0
gbcbrAuthor Commented:
Thank you, but I can't doit right now because this is production server. I'll do it on Saturday and let you know the result.
0
Duncan RoeSoftware DeveloperCommented:
Are you saying it didn't work without a reboot? It should  do no harm to insert /.profile
0
gbcbrAuthor Commented:
For me most important to save all args after rebooting system, so even if I'll do your instruction now, I can't check it because I can't stop the server.
0
tel2Commented:
If you'll excuse the side-topic shell trivia guys, as far as I know, there is no need to do this kind of think these days:
    DISTINCTIVE_VAR=xxxx
    export DISTINCTIVE_VAR
I think you can do the same thing in a single command like this:
    export DISTINCTIVE_VAR=xxxx
Or am I mistaken?

Just tell me if I'm being too helpful re the real problem.
0
Duncan RoeSoftware DeveloperCommented:
Certainly in bash (the Bourne-again shell) you can enter export DISTINCTIVE_VAR=xxxx. But this is SOLARIS sh - the original Bourne shell. You still need to do the export in 2 steps with it.
(Don't expect to verify this on a Linux system. sh is usually a symbolic link to bash. When bash is invoked as sh, it doesn't source .bashrc, but it still accepts bash extensions like help or export DISTINCTIVE_VAR=xxxx).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tel2Commented:
OK, thanks for that, Duncan.  I'm learning.
tel2
0
gheistCommented:
You can set variables of shared comonents (like oracle client or best JDK) in /etc/profile

skel is distributed to freshly created users.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.