This is how I did:
INSERT INTO wp_users
(user_login
, user_pass
, user_nicename
, user_email
, user_url
, user_registered
, user_activation_key
, user_status
, display_name
) VALUES
(‘user1’, ‘md5 generated password’,’user1′,’[email protected]’,”,’some_date’,”,0,’user1′);
I checked the databasse after adding a user from within wordpress and some other tables are also changed but it do seem to work anyway.
I added a couple of hundred users like this and updated their roles from the admin interface.