useradd_base is also used by extrausers.bbclass, so it would be best if useradd_base decided where to use as a lock ($rootdir/${sysconfdir} sounds sensible) instead of expecting that the caller sets FLOCK_FILE and mysteriously failing if it wasn't set.
Also if we're locking and waiting properly instead of using timeouts and loops, can we remove the "does it exist?" check before the operation (eg groupadd -f will exit 0 if the group exists) and after (with proper locking that shouldn't be happening).
Ross
-- Regards, Neil | Kai Kang