Again, suggest installing phpmyadmin so you can inspect the mdl_user table of the DB for the test server. The initial account created when the Moodle was first installed (recommended login was 'admin') should always remain (and possibly still be 'manual'). That means the admin account authenticates from login/password in the mdl_user table of the Moodle DB. Now if someone did a global thing with the DB, then all accounts (including the one that should always remain 'manual') have been set to authenticate via SAMIL. phpmyadmin can change that. Now I can't tell you specifically what to type/use/edit, etc. I can only point you where to look, etc..
Typicallly, the first account (ID #1 is guest) and account ID #2 was/is the initial admin account set to manual.
Second item ... you've not said what authentication plugin you've installed to use SAMIL, so, blindly suggesting you check out your config.php file to see if there are any special lines related to SAMIL. Comment them out by editing config.php and placing // in front of those lines. That may still NOT get you in so two more items to add to config.php:
That will make *all* accounts valid ONLY IF they are set to manual in mdl_user table and thus manual would be the only accepted authentication method. Again, there should be one account that authenticates via the moodle DB. You can verify that with installation of phpmyadmin and inspecting the mdl_user table.
Also, and here again, this is guess, cause authentication plugin used has not been shared, there could be a setting in the mdl_config table for alternateloginurl.
In your config.php file, add:
Thus setting that to blank.
The database you are using for the test server was never really cleaned to remove references to the production site, so images/links to files, etc. probably will not work. When setting up a test site from production, one has to treat the setup of the test site like it was a migration and un-link items to production site so strange things won't happen.
And, again, since you've not mentioned the SAMIL plugin you've added, suggest reading over the documentation to that plugin and reverse engineer the settings (whatever you had to do to get it to authenticate via SAMIL) in the test server to make the test server manual authentication only and basically a standard/generic Moodle server.
If the test box were mine it would be Linux. A trick I've learned that *might work* to get out of such snafus is to hide things from Moodle. IF there is a 'samil' folder in moodlecode/auth/, one can hide that folder from Moodle by changing it's name from 'samil' to '.samil' ... notice the 'dot' in front of the second in the example. Apache/thus Moodle will NOT see that folder. This allows you to hide code without really changing anything. Now also have to warn that might not work. So to put it back, simply renamed the .samil folder to samil.
Without very specific information, don't think anyone can help you with very specific 1,2,3's.
OR ... you could wipe out the test site completely. Install a fresh/blank, version close to the production version ... this one would have only two accounts - guest and admin. Test your no user restores or full course backups (although full course restores could complain about NOT having SAMIL).
'spirit of sharing', Ken