mraguthu
11th February 2005, 05:07
Hi Group,
My SOX team is pushing me to restrict the second login in our Baan. There is lot of information available for Unix users in this Board, but not for AS/400 users. As a first attempt I tried the script, it didn’t work. After that I tried line by line as experiment in my Q shell (qsh), up to line 4 did work well. Line 5 is not working. Is it I am doing any thing wrong? Or is there any another way I can restrict the 2nd Bshell? Please let me know…

********************************************************
1) licmon6.2 -w|cut -c24-35|cut -f1 -d. >/tmp/$USER.lis
2) y=0
3) user_name="$USER"
4) echo $USER_PID >> /tmp/us.lis
5) y=`grep -w $user_name /tmp/$USER.lis |wc -l`
6) if [ $y -eq 0 ]
7) then
8) exec ${BSE}/bin/bshell6.2 $*
9) else
10) exec ${BSE}/bin/bshell6.1 $* tdsqllogin
11) fi
*********************************************************

Thanks,
Mur Raguthu

pconde
11th February 2005, 09:09
Hello,

qsh is a very limited emulation of a unix shell. I think that you must read the qsh manual and see if grep or wc support all the switch that you use. I worked 1 year ago with baanERP on AS400 and I found that many scripts working in "standard unix" doesn't work on qsh.

Regards
Philippe

Markus Schmitz
11th February 2005, 10:09
Hi there,

just a question:

what has SOX got to do with permitting a second login or not?

mraguthu
11th February 2005, 18:00
It seems to be not directly related to SOX. But our parent company suggested our divisional SOX team that “one user only able to get in once” That is the reason why our divisional SOX team talking about how we do this in Baan.