Not sure if this is the right place to submit this, but I noticed that if you run this script twice with same arguments, it breaks the permissions on /home/user
in the root filesystem.
First time around, the uid/gid are 1000:1000 as expected.
$ sudo ./tools/l4t_create_default_user.sh --username user --password foo --hostname bar --accept-license
$ stat -c '%u %g' rootfs/home/user
1000 1000
Second time around, it breaks it and chooses some weird uid/gid:
$ sudo ./tools/l4t_create_default_user.sh --username user --password foo --hostname bar --accept-license
Creating: Username - user, Password - foo, Autologin - false
useradd: user 'user' already exists
chown: cannot access '125:133': No such file or directory
chown: cannot access '126:134': No such file or directory
chown: cannot access '1000:1000': No such file or directory
$ stat -c '%u %g' rootfs/home/user
124 7