eddiept
31st January 2004, 11:19
How can we prevent a user from logging into Baan a second time in Windows 2000?

I try to replace ntbshell.exe with a program that call it but without sucess.

This is possible anyway? That I did wrong?

victor_cleto
6th February 2004, 13:18
This is not easily done on Windows.
Search the board, this has been discussed earlier, this one will get you a good start for windows: http://www.baanboard.com/baanboard/showthread.php?s=&threadid=8098&perpage=5&display=&highlight=login%20allow&pagenumber=1

Andy..
9th February 2004, 19:41
As well as safely timing out idle Baan users, CloseIdle allows you to limit multiple Baan logins per PC.

Information and demo version available at...
www.closeidle.co.uk (http://www.closeidle.co.uk)

suhas-mahajan
11th February 2004, 07:56
You can make a VB exe which will rename BW.EXE to NBW.EXE if it is there, and it will check NBW.EXE is running into memory or not. Attach BaaN icon to this EXE and deploy it to all endusers desktop. I do know few loopholes (1-2) out of it, but for a average person thats not possible to break it.
ClosIdle also a good option, but it is too expensive, if you find its AMC costs etc. As I know CloseIdle serves you mainly two features i.e. Timeout mechanism and preventing users to take more than one licence. Timeout mechanism already provided with BaaN i.e. session_timeout and use this EXE for second feature.

Just a thought.

for more info. download pslist.exe from http://www.sysinternals.com/

-Suhas

~Vamsi
11th February 2004, 18:58
Suhas,

Could you post the sources and the compiled VB program to the Code & Utilities Forum.

suhas-mahajan
12th February 2004, 07:10
Vamsi,

It was just a thought, at present I don't have that EXE. Are you thinking to improve this logic for other projects? How urgent is this? I don't have much time available, but if it is really urgent, I could try to build/send something.

Regards,

-Suhas

~Vamsi
12th February 2004, 18:30
Suhas,

There is no urgency. For some reason reading your post, I thought you already implemented such a thing. If you implement such a program please post.

No Evidence
3rd April 2006, 15:08
NOTE from thread admin: The initial request is for a WINDOWS solution, the below is a UNIX one and thus does not apply.
There are a lot of UNIX solutions already posted (including ones that do notify users).

We have got this tested and working:

Create a file called: bshell_user6.1 in your $BSE/bin/

Permissions:
-rwxrwxrwx 1 bsp bsp 1830 Mar 20 10:52 bshell_user6.1

Contents of the file:

#!/usr/bin/sh

OWN_DIR=`dirname $0`

BSHELL_GRP=bshells # users allowed to login more
# than once
OLD_BSHELL=bshell # Name of original-bshell
NEW_BSHELL=bshell_user # Name of customized bshell
DOUBLE_LOGIN_SCRIPT=$OWN_DIR/MSG_double_login # Name of script to execute

############################################################
# set environment

/baan/bse/setbse

############################################################
# skip special rules if USER is empty
if [ -z "$USER" ]
then
exec $BSE/bin/bshell6.1 $*
exit $?
fi

############################################################
# prevent double_login

OPEN_BSHELLS=`ps -u $USER | grep -v $NEW_BSHELL | grep $OLD_BSHELL |wc -l`
IN_GROUP_BSHELLS=`groups $USER | grep $BSHELL_GRP | wc -l`
if [ $OPEN_BSHELLS -gt 1 -a $IN_GROUP_BSHELLS -eq 0 ]
then
exec $BSE/bin/bshell6.1 $* feapb0100m000 $DOUBLE_LOGIN_SCRIPT
exit 1
fi

############################################################
# call original bshell6.1 with all parameters

exec $BSE/bin/bshell6.1 $*

############################################################
# END OF FILE

Next, we put this line in our $BSE/lib/ipc_info

bshell_user s 0 0 p ${BSE}/bin/bshell_user6.1

In the BaaN client:
We changed Bshell name: to: bshell_user

It doesn't give the user any friendly message, but it works so far for us. We are still working on giving the user a clear notification he's logged in twice.

baancust
15th March 2008, 10:35
exec bshell6.1 $* is in unix . how to do same in windows may be inside bat file??????

NOTE from thread admin: The initial request is for a WINDOWS solution, the below is a UNIX one and thus does not apply.
There are a lot of UNIX solutions already posted (including ones that do notify users).

We have got this tested and working:

Create a file called: bshell_user6.1 in your $BSE/bin/

Permissions:
-rwxrwxrwx 1 bsp bsp 1830 Mar 20 10:52 bshell_user6.1

Contents of the file:

#!/usr/bin/sh

OWN_DIR=`dirname $0`

BSHELL_GRP=bshells # users allowed to login more
# than once
OLD_BSHELL=bshell # Name of original-bshell
NEW_BSHELL=bshell_user # Name of customized bshell
DOUBLE_LOGIN_SCRIPT=$OWN_DIR/MSG_double_login # Name of script to execute

############################################################
# set environment

/baan/bse/setbse

############################################################
# skip special rules if USER is empty
if [ -z "$USER" ]
then
exec $BSE/bin/bshell6.1 $*
exit $?
fi

############################################################
# prevent double_login

OPEN_BSHELLS=`ps -u $USER | grep -v $NEW_BSHELL | grep $OLD_BSHELL |wc -l`
IN_GROUP_BSHELLS=`groups $USER | grep $BSHELL_GRP | wc -l`
if [ $OPEN_BSHELLS -gt 1 -a $IN_GROUP_BSHELLS -eq 0 ]
then
exec $BSE/bin/bshell6.1 $* feapb0100m000 $DOUBLE_LOGIN_SCRIPT
exit 1
fi

############################################################
# call original bshell6.1 with all parameters

exec $BSE/bin/bshell6.1 $*

############################################################
# END OF FILE

Next, we put this line in our $BSE/lib/ipc_info

bshell_user s 0 0 p ${BSE}/bin/bshell_user6.1

In the BaaN client:
We changed Bshell name: to: bshell_user

It doesn't give the user any friendly message, but it works so far for us. We are still working on giving the user a clear notification he's logged in twice.

baancust
15th March 2008, 10:36
how to do this in windows
i.e equivalent to exec bshell6.1 $*

suhas-mahajan
17th March 2008, 06:46
baancust,

You can try this -

http://www.baanboard.com/baanboard/showthread.php?t=29875

Hope this helps.

regards,

-Suhas