Re: [yocto] User login fails despite successful creation with useradd class on NVIDIA Jetson AGX Orin #yocto #nvidia-jetson-ags-orin

[email protected]
Newsgroups org.yoctoproject.lists.yocto
Message-ID <[email protected]>
I managed to solve the login issue. I used your distro for that.

However, the issue was not connected to Yocto but to the way I flash the image. My situation was that I was able to build, flash and boot. But everytime I saw a ubuntu-gnome-like GUI with a user "jetson" that I had not created. The problem was that I had a M.2/nvme harddisk on my jetson. This caused issues during the flashing and booting that did not result in any error messages. When I removed the M.2/nvme device from the AGX Orin and flashed the yocto files onto the emmc chip, it worked. I was able to login with the user "root" without any password.

Unfortunately, I still do not manage to create a custom user. Now I'm hitting an issue with EXTRA_USERS_PARAMS on my Jetson AGX Orin build. My user setup works fine for the main image but bombs out on the minimal Tegra images:
My config ( from yoe-distro ( https://github.com/YoeDistro/yoe-distro/blob/master/conf/projects/jetson-agx-orin-devkit/config.conf ) ):

# Setting a user/password in system
INHERIT += "extrausers"
EXTRA_USERS_PARAMS += "\
useradd admin; \
usermod -p '$(openssl passwd -6 myrootpassword)' admin; \
usermod -p '$(openssl passwd -6 myrootpassword)' root; \
usermod -a -G adm admin; \
usermod -a -G video admin; \
usermod -a -G audio admin; \
usermod -a -G systemd-journal admin; \
"
# Remove features that allow empty passwords - this MUST be uncommented to work
EXTRA_IMAGE_FEATURES:remove = "allow-empty-password empty-root-password"

Error during build:
usermod: group 'systemd-journal' does not exist
ERROR: tegra-espimage: usermod command did not succeed.

The problem is that tegra-espimage and tegra-minimal-initramfs don't include systemd, so no systemd-journal group gets created. But my main yoe-simple-image has systemd and needs this group assignment.
Same machine config builds multiple image types - some with systemd, some without. EXTRA_USERS_PARAMS gets applied to all of them.

What's the cleanest way to handle this? Conditional logic in the user params? Per-image overrides? Or am I missing something obvious? Currently just removing the systemd-journal line to get builds working, but then my admin user can't read journals in the full image.

Thanks!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.