Uxue__
28th November 2006, 17:00
Hi all,
Hope anybody can suggest any idea for my problem. In my organization almost every user has more than one BAAN user. We link different BAAN users with same system login (domain user). We call each combination "profile", so it's very common that each user has more than one profile.
We have designed a "session control" system so we don't want to allow users to have more than one active ntbshell with the same profile. But we must allow them to have different profiles running. We don't need to set this control during logging process.
The problem is that in OS (which is W2003), all running ntbshells are identified by the domain user, so we don't know which profile is connected.
Any idea on how to read the USER variable of a running ntbshell? Or any other idea to find out who is the "real" BAAN user connected?
Any help would be highly appreciated.
george7a
28th November 2006, 17:59
Hi,
Check the following threads:
http://www.baanboard.com/baanboard/showthread.php?t=1937&highlight=bshcmd
http://www.baanboard.com/baanboard/showthread.php?t=25098&highlight=bshcmd
I hope it helps,
- George
Uxue__
28th November 2006, 18:10
Hi,
Thanks, but I've already read those links and they are not valid for my situation. I know the PID of the other ntbshell process, but what i need is the BAAN user who runs it, not the system user or the PID.
The idea is to detect exactly the BAAN user who is connected, not the operating system user. As I've tried to explain before, maybe I wasn't very clear, is that the same operating system user is linked to different BAAN users. And what I need to know is who is that BAAN user.
In our bw config, we set -- -set USER=xxxx .... I'd like to read that USER value for another ntbshell process.
Thanks anyway!
norwim
29th November 2006, 09:18
Hi there,
just an idea:
write a shell script, which does nothing else but detect $USER and $PPID (parent process of this shell is the bshell) and writes these two values into a textfile (one textfile, for instance named xxx.$PPID).
Create a mini-Baansession, which calls this script and exits.
Call this Session from all the .bwc files.
Now you can browse through these files to determine the usernames.
As you cannot call an corresponding session when a user closes the GUI (leaves Baan) to erase the textfile you will need another small shell script that erases all textfiles if there is no bshell process with $PPID. This script will have to be run periodically or loop endlessly with a sleep command.
[If anyone has an idea here, how to automatically call a session as a last step before the bshell is terminated, please give a note here]
Hope that helps
Norbert
george7a
29th November 2006, 09:31
Call this Session from all the .bwc files.
Another option other than the .bwc files is to define a startup session (group) for every user in Baan.
Another option will be using the BMS mask data session (be careful there was a thread (http://www.baanboard.com/baanboard/showthread.php?t=28671&highlight=BMS) that says there is a bug in BMS and nobody answered it!).
- George
Hitesh Shah
29th November 2006, 15:23
We restrict our logins per OS user in our windows environment . For that we have followed the following procedure.
1 .Create a session without form and 3gl script attached to it .
2. This session should be in startup session for all users.
3. Create a customized table in any company preferably 0 if possible with fields like user , os user , department , quota if any etc .
4. The startup program , scans this table , scans the license information (it will give u OS user) and then kills all processes if he/she has exceeded his/her quota .
In our example we use get.resource$("unixuser") to get the OS user . U can use logname$ along with OS user as aforesaid to accomplish the task .