Handling multple profiles with single user account

Team ,

I would like to handle multiple profiles(.profile/.kshrc, .profile1/.kshrc1..etc) with single user account as 'useradm' in same server.

for example :
firstly login into server with useradm account it has to load .profile/.kshrc or profile1/.kshrc1, set the environment variables and able to access application A or B.

mean to say load profiles dynamically with single user account to manage the applications by setting environment variables

please let me know the possibilities

Your requirements are not at all clear.

When you login as useradm with ksh as your login shell, it will run .profile in useradm's login directory or the current working directory if one does not exist in useradm's login directory, and interactive shells will run .kshrc (or the file named by the ENV environment variable if it exists) if it exists.

Once that happens, why can't useradm run any desired application?

Why does a different set of initialization files need to be sourced to run a different application?

Hi Don ,

I'm planning to invoke multiple versions of application software using useradm account.
for example application software version is 1.0 & 2.0 , location of libraries, executables, jars are different as per versions and environment variables needs to be set accordingly .Please let me know how to set the environment dynamically ..
Thanks

If I get you correctly, you could define two aliases which in turn execute two scripts that create/set the relevant environment, locations, versions, etc...

Hi,

I have below profiles, only one profile(either 1 or 2) has to set in environment under useradm account.

1) . /opt/ibm/mqsi/9.0.0.2/bin/mqsiprofile

2) . /opt/IBM/iib-10.0.0.0/server/bin/mqsiprofile

Do you really have the two directories /opt/IBM and /opt/ibm ?

What commands will be run after you execute:

. /opt/ibm/mqsi/9.0.0.2/bin/mqsiprofile

that depend on the variables initialized by that script?

And, what commands will be run after you execute:

. /opt/IBM/iib-10.0.0.0/server/bin/mqsiprofile

that depend on the variables initialized by that script?

After running one of the above scripts, will useradm want to later execute the other script before logging out and logging in again?

Hi Don ,

Yes, we have two ibm & IBM directories.

Currently , below script has been set in .kshrc file
. /opt/IBM/iib-10.0.0.0/server/bin/mqsiprofile

it will set environment variables with prefix as mentioned below.
MQSI_* (nearly 20 entries)

my question is how to invoke and set in environment variables MQSI_* (nearly 20 entries) for below version ?

Thank you for the information. I asked four questions. You answered the 1st one only. What about the other three?