Quoting Jason Flatt drupal@oadaeh.net:
I've got an intranet site up and running that was started w/Drupal 4.7.something. I installed, at that time, the node privacy byrole module [1] to control who can access what. Eventually, I got around to updating the site to Drupal 5. Before I started that process, I disabled all contributed modules, including node privacy byrole. I was pretty sure I followed all the steps necessary to disable that module, but I must have missed something, because now no access control module I've tried will work.
Make sure that the system table, the cache tables and the variables table is cleaned for the modules you've removed. Although present with at least 5.0 not all modules make use of the hook module to delete itself fully when deactivated. From that point, if you have deactivated contributed modules but still maintain the module source in the modules path it may cause undesired effects because the module file is loaded just because it exists. You should remove these unwanted modules before cleaning the DB tables because they may populate on loading depending on how good the module design is.
Earnie