1825715 Members
3084 Online
109686 Solutions
New Discussion

user profile

 
SOLVED
Go to solution
Mohd Mohtar
Frequent Advisor

user profile

Hi,

I have some qns on user profile.Presently, my company is embarking on a new ERP application replacing the current one.

Users accessing the current ERP apps via the .profile in each user /home dir.

My qns are as follows:

1) Without creating a new user id, can i use the same id to access the new ERP apps, ie users r able to access either one of the ERP apps

2) Do I need to create a secondary group for this purpose?

My reasons for the above qns is to avoid creating another set of user ids for the new ERP.

Thanks

regards,

Mok
26 REPLIES 26
Piergiacomo Perini
Trusted Contributor

Re: user profile

Hi Mok,

in my opinion you can use the same user id and create secondary group, obviusly according to ERP apps requests.

regards
Muthukumar_5
Honored Contributor

Re: user profile

Will ERP application create new user ID. IF so you can not stop there. If that application is needing you to create a user ID or dynamically creating that during installation then you can not stop that.

Else, you can access with your user account and group to access it.

hth.
Easy to suggest when don't know about the problem!
Sivakumar TS
Honored Contributor

Re: user profile

Dear Mohd,

The anwsers can be

1) Creation of new user is not required as we can modify the /etc/profile to make system wide variables required to enable the new ERP App working & also we can add necessary lines ( executable/variables) to the individual users, specific to their need, so that they will be able to use the new ERP.

2) Secondary Group creation is required only when the new ERP appn requires diffrent set of permisions. ( ALSO during the installation of the new ERP we can also customize this )

HtH,

Siva
Nothing is Impossible !
Mohd Mohtar
Frequent Advisor

Re: user profile

Hi,

/home/user/.profile contain a script file to access ERP A. I want to add another script file to access ERP B. But the problem is I do not how to tell the server which script to use for which purpose?

regards,

Mok
Andy Torres
Trusted Contributor

Re: user profile

I once worked on a system that had several instances of the same database on it, and different sets of users wanted to have the option to access their choice of instances at login. I implemented a menuing system within the /home/user/.profile that presented prompts for them using a few case statements. As they managed to consolidate the instances, I was able to comment out each option/instance as they were eliminated. Eventually, I removed the prompts and cases when they eliminated the last one.
Mohd Mohtar
Frequent Advisor

Re: user profile

Hi,

Allow me to explain the situation.User A access to ERP A via .profile in /home/userA/ and i want to use the same user A id to access ERP B.

User A will need to access both ERP A & ERP B at the same time for cross checking of data till one fine day, user A will only access to ERP B.

I have added a secondary group for all users and I really apprecuare if anyone can show me the way to do it?

My last option will be to create new set of user ids for ERP B which I'm trying to avoid.

tks

Mok
Mohd Mohtar
Frequent Advisor

Re: user profile

Hi,

Allow me to explain the situation.User A access to ERP A via .profile in /home/userA/ and i want to use the same user A id to access ERP B.

User A will need to access both ERP A & ERP B at the same time for cross checking of data till one fine day, user A will only access to ERP B.

I have added a secondary group for all users and I really apprecuare if anyone can show me the way to do it as I'm not an expert in scripting?

My last option will be to create new set of user ids for ERP B which I'm trying to avoid.


tks

Mok
Piergiacomo Perini
Trusted Contributor

Re: user profile

Hi again Mok,

if user have to login on server and then can use ERP then,as Andy wrote, you can arrange .profile with case istruction;

if user acces ERP by gui interface/client ...
maybe creation of new user (server side) is needed

regards
Andy Torres
Trusted Contributor
Solution

Re: user profile

Here's an example of the script I mentioned before. You just put it in the .profile and have the user log in two sessions, choosing each ERP:

LOGO="ERP Access Menu"
badchoice () { MSG="Invalid Selection ... Please Try Again" ; }

# Menu Prompts
amenu="a. ERP A" ;
bmenu="b. ERP B" ;
cmenu="c. Exit" ;

# Commands to execute
apick () { /command_to_start_ERP_A ; }
bpick () { /command_to_start_ERP_B ; }
cpick () { exit ; }

# Display the Menu
themenu () {
clear
echo "\t\t\t" $LOGO
echo
echo
echo "\t\t\t"$amenu
echo "\t\t\t"$bmenu
echo
echo "\t\t\t"$cmenu
echo
echo $MSG
echo
echo "\t\t\tEnter Your Selection: \c" ; }
MSG=
while true
do
themenu
read answer
MSG=
case $answer in
a|A) apick;;
b|B) bpick;;
c|C) cpick;;
x|X) exit;;
*) badchoice;;
esac
done
Christine Hartman
Valued Contributor

Re: user profile

Hi there,

we usually just have 2 .env files in the users' home directories (i.e. applmgr, appsmgr, etc.) one will be called 11idev.env and the other might be 11ipatch.env.
Once the user logs in....they can just source the .env file of the instance they wish to work in....these .env files setup the required oracle PATH and other VARIABLES for each env.

This way...the .profile doesn't have to be modified.

Are these users DBAs/application admins or just app users?
Mohd Mohtar
Frequent Advisor

Re: user profile

Hi Andy,

Thanks for the script. I will try it out and let u know of the outcome.

Hi Siva,

Can you give me some examples?

Hi Christine,

Users are apps users.

Hi All,

Users will be using different client emulation to access respective ERP (I guess it will not be much of a different). Nevertheless, I will try out the script given by Andy.

Thanks again

Mok
Mohd Mohtar
Frequent Advisor

Re: user profile

Hi Andy,

${HOME:-.}/.profile[13]: syntax error: `}' unexpected = while running the script, its pointing to cmenu="c. Exit";

regards,

Mok
Muthukumar_5
Honored Contributor

Re: user profile

Post that .profile here? May be = is having space before or after that at 16th line.

-Muthu
Easy to suggest when don't know about the problem!
Mohd Mohtar
Frequent Advisor

Re: user profile

Hi,

The attached file as requested.

regards,

Mok
Muthukumar_5
Honored Contributor

Re: user profile

Problem is with this:

#Commands to execute
apick () {$BSE/bin/check_licenses;}
bpick () {/home/esoper01/pronto;}
cpick () {exit;}

Problem is with needed after { as,


#Commands to execute
apick () { $BSE/bin/check_licenses;}
bpick () { /home/esoper01/pronto;}
cpick () { exit;}

It will work after that change.

-Muthu
Easy to suggest when don't know about the problem!
Mohd Mohtar
Frequent Advisor

Re: user profile

Hi Muthu,

Thanks for reply. The menu works but nothing happen when I choose either a or b. Only c (exit) works. Anything that I might have missed out.

Mok
Muthukumar_5
Honored Contributor

Re: user profile

what are you getting for this:


a) /home/esoper01/pronto and $BSE/bin/check_licenses

Is it running in command line? Can you paste the results. If it is not running then script will not make to run it.

# $BSE/bin/check_licenses
# /home/esoper01/pronto

Paste the results or error here.

-Muthu
Easy to suggest when don't know about the problem!
Andy Torres
Trusted Contributor

Re: user profile

I don't see where $BSE gets set. I assume you are setting it in the /etc/profile, or sourcing it into the environment prior to the user's .profile.

You removed quite a few spaces from the menu I posted ealier. I cleaned it up a bit and attached it here. Try this one without editing the spaces.
Mohd Mohtar
Frequent Advisor

Re: user profile

Hi,

The scripts works great. Now I'm having another problem.Option A will work when user group is at primary which is current. Option B will work when I change user group is secondary manually.

How do I change the gid according to respective ERP apps via script?

Thanks

Mok
Andy Torres
Trusted Contributor

Re: user profile

I'm not sure I understand your question.
As long as the user is a member of both groups they should have access to both options, right?
Mohd Mohtar
Frequent Advisor

Re: user profile

Hi Andy,

It doesn't work.Apps A will work when gid is at "abc" & Apps B will work when gid is at "def".

I will have to change the gid manually each time I need to access the respective apps.

Mok
Andy Torres
Trusted Contributor

Re: user profile

Can you post an example of the users' group memberships, like:

user: groups
===================
andyt: erpA, users, erpB
mohdm: erpA, users

You can get the users' memberships by entering "groups [user]"
Mohd Mohtar
Frequent Advisor

Re: user profile

Hi Andy,

The user groups is

userA:abc(primary),def(secondary)

ERP A will work when the group is at abc & ERP B will work when the group is at def. Is there a way to set a condition on the script that u provide to change the user group according to the ERP apps.

Having say this, user can access to only one ERP at one time.

Please help as I need to decide whether to stick to this option and get user approval or create another set of user id for ERP B.

Thanks for your time and assistance so far

Mok

Andy Torres
Trusted Contributor

Re: user profile

Without knowing your system and application intimately I can't be TOTALLY sure, but it looks like your application is the culprit, not your group assignments. If the users are members of both groups there should be no reason you can't use the menu option unless the application is limiting user sessions.

"Having say this, user can access to only one ERP at one time."

If each user is only allowed to access the ERP once, no amount of group wrangling is going to help. You will have to create two user accounts for each user that wants to access the ERP twice.

Sorry. If I had known the ERP application limited user sessions I would not have suggested the menu.