Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > Code & Utilities

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #31  
Old 6th February 2005, 15:52
ranias's Avatar
ranias ranias is offline
Member
 
Join Date: Feb 2002
Location: Israel
Posts: 54
ranias is on a distinguished road
Baan: BaanIV, BaanERP 5.0b and higher - DB: Oracle/SQL - OS: Unix/Win2000
Arrow password aging via badmin not implemented

NPrao,
1. I have checked the badmin6.2 utility and it's not implemented in my system. I don't use password aging option using Baan binary badmin6.2.

#badmin6.2 -chkpwd bsp
-1005: The aging for name is turned off.

2. I haven't made any changes to Dave script with the pstat() function.

Here's the problem I'm facing:
1. I changed the digit 1 to 0 in the file $BSE/security/user and this way I forced the user password to expire according to Dave passage script usage.
2. I added the session running the script Dave provided in this thread in the BMASK with boot option/Automatical add mask checked.
3. When I log on the system with BSP user I get the shell windows opened with message to change the expired password. attached file.
4. In the shell windows I type wrong old password by purpose to see if the bshell gets killed if user doesn't proceed with the password change, thus the shell windows closes and the bshell process goes on working normally.
Process wasn't killed and user with expired password wasn't blocked and forced to change it.
5. One thing I noticed, running the tccompassage session with the script again after the failure of killing the bshell process would open the shell windows again and I would by purpose try to type a wrong old password, this time the process is killed and the user is out of the Baan BW.
6. I suspect the script can't determine process status when running with BMASK module when the user is logged in the system.

Dave, What do you think ? have you encountered this behaviour?

Thanks for your help,
- Rain
Attached Images
File Type: jpg change_pass.jpg (40.2 KB, 24 views)

Last edited by ranias : 6th February 2005 at 16:21.
Reply With Quote
  #32  
Old 6th February 2005, 18:10
dave_23's Avatar
dave_23 dave_23 is offline
Guru
 
Join Date: Oct 2002
Location: Portland, OR
Posts: 1,303
dave_23 will become famous soon enough
Baan: All - DB: Oracle / MS SQL / DB2 - OS: All
I've never really understood the bmask area... but it could be that bmask starts up the session THEN starts up the rest of the engine (regardless of what the session does) since there is no menu, or standard program running the pstat won't kill anything.

Since Baan's password aging seems to stop people from logging in there must be a function that one could call in the otccompassage program to exit Baan all together.

If anyone finds it, let me know and I can do away with the Startup Session aspect of it (since the bmask is a much better option)

Dave
Reply With Quote
  #33  
Old 6th February 2005, 18:31
ranias's Avatar
ranias ranias is offline
Member
 
Join Date: Feb 2002
Location: Israel
Posts: 54
ranias is on a distinguished road
Baan: BaanIV, BaanERP 5.0b and higher - DB: Oracle/SQL - OS: Unix/Win2000
Arrow can you use bshell.pid() ?

Dave,
Is there a way to use bshell.pid() function to kill the process from the OS level.
The question, if there is another function that takes the value of the OS process ID returned and kills it.
kill() works for pstat only.

- Rain
Reply With Quote
  #34  
Old 6th February 2005, 19:41
dave_23's Avatar
dave_23 dave_23 is offline
Guru
 
Join Date: Oct 2002
Location: Portland, OR
Posts: 1,303
dave_23 will become famous soon enough
Baan: All - DB: Oracle / MS SQL / DB2 - OS: All
cmdstr = "kill " + bshell.pid();
You could probably use something like shell(cmdstr);

I think there's got to be a return value or something that will do this
more elegantly though!

Dave
Reply With Quote
Sponsored Links
  #35  
Old 7th February 2005, 13:24
ranias's Avatar
ranias ranias is offline
Member
 
Join Date: Feb 2002
Location: Israel
Posts: 54
ranias is on a distinguished road
Baan: BaanIV, BaanERP 5.0b and higher - DB: Oracle/SQL - OS: Unix/Win2000
Smile the idea was good...

Dave,
The idea was good but I made some changes to the code you posted since it didn't work the pid should be converted to string in order to concatinate it with the "kill" command.
I tested it with the code posted, this time it work out properly and it kills the bshell process when session tccompasssage runs from BMASK.

Posted new code for the script:
Code:
long    ret
        long    info(PSMAXSIZE)
        string  progname(512)
        long    procid
        string  cmdstr(500)
	

function main()
{
        ret = shell("${BSE}/scripts/passage",SHELL_MWINDOW)
        if ret > 0 then
                procid = -1
                procid = pstat(procid, progname, info)
		cmdstr="kill " & str$(bshell.pid())
		while procid > 0
                                      procid = pstat(procid, progname, info)
	 		shell(cmdstr,SHELL_MWINDOW)
			kill(procid)
		endwhile
        endif
}

I will use this solution for the production invironment. I will check also the release of bug fixes for it.
Thanks for your assistrance,
- Ranias

Last edited by ~Vamsi : 7th February 2005 at 19:25. Reason: Added code tags
Reply With Quote
  #36  
Old 7th February 2005, 20:13
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,032
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
That info helped. I think there might be a bug in Dave's program to handle startup sessions, or 3-GL programs executing from the BMS mask data.
Code:
 function main()
{
        ret = shell("${BSE}/scripts/passage",SHELL_MWINDOW)
        if ret > 0 then
                procid = -1
                procid = pstat( procid, progname, info)
                        while procid > 0
                        procid = pstat(procid, progname, info)
                        <b>kill(procid)</b>
                endwhile
        endif
}
You shouldnt kill the current process pid, there might be other programs started after this tccompaassage 3-GL script.
Here is part of my code -
Code:
	for i = 1 to proc.counter
		if processid.array(i) <> pid then
			kill(processid.array(i))
		endif
	endfor
free.mem(processid.array)
kill(pid)
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao

Last edited by NPRao : 7th February 2005 at 21:10.
Reply With Quote
  #37  
Old 7th March 2007, 15:04
PV Ramone's Avatar
PV Ramone PV Ramone is offline
Senior Member
 
Join Date: Aug 2001
Location: Heist-op-den-Berg (BE)
Posts: 118
PV Ramone is on a distinguished road
Baan: Baan IV c4 - DB: Oracle 9.2 - OS: HP-UX 11.11
cannot get it to work to logout

hi, i cannot get it to work to logout of baan.
In neither of the scripts the kill seems to work or actually stop the bshell.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NEW: vbcode CODE extensions patvdv About Baanboard.com 3 13th March 2003 12:19
CODE: AWKward Script for Baan Reports' passage to MS Excel sitarammani Code & Utilities 19 31st August 2002 17:50
CODE: Retrieve ENUM Description from SQL Server with VB Ruskin Code & Utilities 8 8th July 2002 17:37


All times are GMT +2. The time now is 05:08.


©2001-2017 - Baanboard.com - Baanforums.com