Joomla needs those Itemids (menu ids in fact)...
This was the key piece of information that I needed.
What I could not figure out was the meaning of this Itemid=42 values that was being passed along. Oddly it worked without this in the old setup.
Here's what happened:
Site was cracked and I replaced all files and searched through the databse for evidence of introduced data.
I found none so the assumption is that the offender was in one of the many files that I replaced. Installed the latest Joomla and uploaded the old database. Then installed latest versions of all my coms and mods with their customisations re-applied.
What a nightmare.
Everything was working well but at the time that I repopulated the database apparently id numbers in jos_menus were changed, presumably auto incremented. id=42 pointed to a menu id that did not exist. This way even if you paste the supposedly correct url:
index.php?option=com_comprofiler&task=usersList&Itemid=42
because the menu id #42 does not exist you are denied access.
Changed the url to the correct itemid and everything worked.
The problem now is that the id #42 is still somewhere in the db i believe. So I have to find that, change it and all will operate as normal.
Hope that made sense.
Thanks for the hint I needed!
Schmutz