I have Moodle 3.2 installed on a Ubuntu. I've configured external database enrollments and authentication. Courses are being created, enrollments are fine, but users only get created when they log in for the first time, not when the cron job runs.
I've read this page dozens of times, but I can't figure out what I'm doing wrong, and after several pages of search results, I can't find a post that has my same problem. I have my cron job set up, and it's definitely running, because users do get created--but only after they attempt to login for the first time.
Here is my cron job:
*/2 * * * * sudo -u www-data /usr/bin/php /var/www/html/moodle/auth/db/cli/sync_users.php -v
PHP: 7.0.13
Apache 2.4.18