Remove default user created by Linux_for_Tegra/tools/l4t_create_default_user.sh

Hi all,

I’ve created a default user with the the script “Linux_for_Tegra/tools/l4t_create_default_user.sh” before flashing.

Now I would like to change the default user for upcoming boards. How could I remove the old default user?

Thanks,
CH

Hi,

The quickest way to remove the default user is to delete the Linux_for_Tegra/rootfs/ directory and then reinitialize a clean root filesystem by running the following command as developer guide show:

sudo tar xpf ${SAMPLE_FS_PACKAGE} -C Linux_for_Tegra/rootfs/

Thanks

Do we have other ways instead of cut and start over?

We’ve also done other customizations and it is not always feasibile by just simply delete the whole directory and reinitialize

Hi,

What is your command to create the default user? Please provide for review

Do you setup auto login or other argument?

Thanks

Our custom carrier board is headless, thus we need to use “l4t_create_default_user.sh” to create a default user to bypass the login steps during flashing

Hi,

Please try below commands to remove user.

$ sudo mount --bind /dev <path_to_Linux_for_Tegra>/rootfs/dev
$ sudo mount --bind /proc <path_to_Linux_for_Tegra>/rootfs/proc
$ sudo mount --bind /sys <path_to_Linux_for_Tegra>/rootfs/sys

$ sudo chroot <path_to_Linux_for_Tegra>/rootfs

(inside of chroot)$ userdel -r <username>
(inside of chroot)$ exit

$ sudo umount <path_to_Linux_for_Tegra>/rootfs/dev
$ sudo umount <path_to_Linux_for_Tegra>/rootfs/proc
$ sudo umount <path_to_Linux_for_Tegra>/rootfs/sys

Since you’ve enabled auto-login, please remove the related settings manually.

Thanks

Hi,

These commands are executed on host machine before flashing? Or execute on Orin NX after flashing?

Hi,

on host machine before flashing

Thanks

Hi,

It’s working. Please help to close the case.

Thanks for your support.

CH

Hi,

Thank you for your feedback.

Please make the solution ✅ so we could close the topics.

Thanks