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

Khem Raj <[email protected]>
Newsgroups org.yoctoproject.lists.yocto
Organization HIMVIS LLC
Message-ID <[email protected]>

On 7/30/25 9:44 AM, felix.beck via lists.yoctoproject.org wrote:
> Hello Yocto community,
> I'm experiencing a persistent login issue with a custom Yocto image for 
> **NVIDIA Jetson AGX Orin (64GB)** (MACHINE = "p3737-0000-p3701-0005", in 
> meta-tegra/conf/machine). The build, flashing, and booting all work 
> correctly, but I cannot login with the created user account through 
> either the GUI login screen or tty2 console. I can only see a user "jetson".
> **Setup:**
> - Custom distro based on Poky
> - Target: NVIDIA Jetson AGX Orin (64GB)
> - Base image: core-image-base
> - User creation via useradd class following official documentation
> **User creation recipe implementation:**
> ```bash
> inherit useradd
> USERADD_PACKAGES = "${PN}"
> USERADD_PARAM:${PN} = "-u 1200 -d /home/myuser -m -s /bin/bash -p '\$6\ 
> $...(SHA-512 hash)...' myuser"
> GROUPADD_PARAM:${PN} = "-g 999 docker"
> GROUPMEMS_PARAM:${PN} = "-g docker -a myuser"
> pkg_postinst_ontarget:${PN}() {
>      cp ${datadir}/${PN}/myuser-sudoers /etc/sudoers.d/myuser
>      chmod 0440 /etc/sudoers.d/myuser
>      chown root:root /etc/sudoers.d/myuser
>      echo 'root:$6$...(same hash)...' | chpasswd -e
> }
> ```
> **Verification by mounting rootfs.ext4:**
> - User exists in /etc/passwd: `myuser:x:1200:1200::/home/myuser:/bin/bash`
> - Password hash exists in /etc/shadow: `myuser:$6$...:...:...`
> - Home directory /home/myuser exists with correct ownership
> - User is member of docker group in /etc/group
> - local.conf has `EXTRA_IMAGE_FEATURES:remove = "debug-tweaks"`
> **What I've tried:**
> - Both MD5 and SHA-512 password hashes (generated with Python crypt.crypt)
> - Following meta-skeleton/recipes-skeleton/useradd/useradd-example.bb 
> pattern
> - Verified against useradd class documentation
> - Simplified sudoers configuration: `myuser ALL=(ALL) NOPASSWD: ALL`
> The user account appears correctly created in the filesystem, but 
> authentication consistently fails at runtime. Are there additional 
> dependencies or runtime configurations needed for password 
> authentication on NVIDIA Jetson platforms that differ from the standard 
> useradd approach?
> Any insights would be greatly appreciated.

We have something to this in Yoe, which might give some hints for you

https://github.com/YoeDistro/yoe-distro/blob/master/conf/projects/jetson-agx-orin-devkit/config.conf#L91-L101


> Best regards,
> Felix
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> You automatically follow any topics you start or reply to.
> View/Reply Online (#65723): https://lists.yoctoproject.org/g/yocto/message/65723
> Mute This Topic: https://lists.yoctoproject.org/mt/114452095/1997914
> Mute #nvidia-jetson-agx-orin:https://lists.yoctoproject.org/g/yocto/mutehashtag/nvidia-jetson-agx-orin
> Mute #yocto:https://lists.yoctoproject.org/g/yocto/mutehashtag/yocto
> Group Owner: [email protected]
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
> -=-=-=-=-=-=-=-=-=-=-=-
>
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.