pjohns
14th December 2001, 10:00
We have just built a new server that will be used for pre-production testing. The data has been taken from a backup of our production system. I would like to delete all user accounts from within Baan on this new server. What's the best and "cleanest" way to do this? Should I use ttaad2100m000 and remove each account one by one?

Whilst I'm talking about removing users how do other people manage accounts when staff leave an organisation. I'm conscious that user names get referenced all over Baan and that if you remove one you get ******** displayed where user names should be. Is there a "proper" Baan procedure that needs to be used or do you just let your ttaad2100 table slowly grow bigger?

Thanks

PJ

victor_cleto
14th December 2001, 11:12
I was writting an example on how to do it here by dumping/changing/importing tables and convert to RTDD, but it was too big and I press a deletion key by mistake (post deleted, doh!). Well, my point is that I finalized saying that after all that, you should check more tables... too much work, better do it manually!

Unless you have somebody that already has "standard" scripts for doing it... (I have some special scripts, but very system dependent)

patvdv
14th December 2001, 13:23
PJ,

Your safest bet remains to delete them manually from Maintain User Data and then removing the u<user> and or r<user> files from $BSE/lib. Note that deleting an user entry from Maintain User Data also deletes any corresponding Remote User entry (Maintain Remote User Data).

Millet
15th December 2001, 00:40
Well, another possibility :


Normally, when you change something for the user configuration (Compagny ..) the table ttaad400 (or ttadv400) is modified.


So :

1 ) Modify 1 user, and look in the session ttaad4100 to show the modification on the table.

2 ) Make a dump of the table ttaad200 (users)

3 ) Delete all the files in the $BSE/lib/users/
Keep a backup to as to be sure to come back

4 ) Modify the dump file ( add or delete some users)

5 ) Make an unix script so as to generate a ttaad400 file (corresponding to the ttaa200)

6 ) Upload your 2 tables

7 ) Run a convert to runtime, normally, all users should be adding in the $BSE/lib/users/


Make some test before, I was done this operation 2 years ago, and I don't remenber everything ....

NPRao
15th December 2001, 04:21
I think the user should also be removed from the database apart from the baan users session and the unix files.

victor_cleto
16th December 2001, 18:12
Delete a user involves 3 steps:
1. Delete user from ttaad2100m000
2. Delete user login from the database (if the user has its own database login)
3. Delete entry of the user from $BSE/lib/xxx/xxx_users (xxx depends on your databases, xxx=ora for oracle).

If you want do use table manipulation, you need to, for each of the users to delete (I assume no remote users exist, otherwise, more tables need to be checked):
1. dump tables ttaad230 (module auth.)+ttaad231 (session auth.)+ttaad400 (convert to rtdd)
2. Create entries in ttaad400: for user conversion + entries for each modules in ttaad230 + entries for each of the sessions in ttaad231
3. Remove entries from ttaad230 and ttaad231
4. Delete the ufile

Afterwards, you need to run ttaad4200m000 to efectively delete the users.
It's a lot of work and there's a lot of checks to do, since some entries must obbey to a certain format in ttaad400!

You would spend a lot of time building and debugging scripts, so use that time to delete all the users manually :)