Only special accounts get past the web logins with Access Code enabled. Specifically the guest account needs the username_auth field set. You control any attribute in an import by ensuring you have the proper header row. So at a minimum you would want:
username,username_auth,enabled
user1,1,1
user2,1,1
The import (Guest > Import Accounts) will detect the fields in the header row and automatically generate the password.
A similar, and often overlooked feature is our pre-registration flag. Change the enabled values to 0 to force disabled. Create a self-registration and enable username on the main registration form. Edit username and at the bottom within the Advanced section is Pre-Registration. Check this and save. The self-registration now requires that field to match an existing entry. This allows you to give codes our but also ask for additional information like name, company, or whatever.