There's commandline/database way IF you've the expertise and tools.
One would have to add another salt line (the one from the 1.9.x that used salted passwords) to the config.php of the 2.4 for this to work.
mysql -e "select username,password,firstname,lastname,email,city,country from mdl_user" -u [DBUSER] -p[DBPASSWORD] [DATABASE] > moodleusers.txt
You will end up with a tab delimited txt file with the columns selected on the first line with all users in the db underneath.
Edit that file with a text editor and edit to taste.
*** Any user lines without a password, delete. Any 'special accounts' - mnet, guest, admin user, etc. *delete*
Then use Bulk Users import in the 2.4.
This will not enroll those users in the courses nor will it assign users as Teachers in courses ... but the users are there.
Someone with more knowledge of MySQL than I might be able to add something to get students enrolled in courses and teachers assigned.
This issue is the sort of thing that kinda dictates one makes moves upwards to 2 inbetween semesters/(grading periods for K12), where the students are not currently active in any course.
'spirit of sharing', Ken