Apalis-iMX6 Yocto build root user

I’m building the toradex yocto distribution for Apalis-iMX6 board and there is this instability.
When I include “debug-tweaks” sometimes default “root” user with empty password works, sometimes it doesn’t I have to recompile a number of times for it to work.
Is there a solution for this issue?
If not, what is the default user and pass without “debug-tweaks” flag?

Which version are you building?

The debug-tweaks property adds the ssh_allow_empty_password to the ROOTFS_POSTPROCESS_COMMAND, I can imagine that this is not reexecuted in some cases. Does bitbake -c clean <imagename> and then build again helps when you change the setting?

By default there is no password set, debug-tweaks allows no password to be accepted via SSH. If it debug-tweaks is not set, then a postprocess command also uses a * in the passwd files, which essentially disallows any login for that user. So there is no way to login as root using password authentication.

You can set a default password using the techniques described here: FAQ:How do I set or change the root password

Alternatively you can also use public key authentication by preinstalling ssh private/public keys.

  1. Ixora V1.1A (Apalis Carrier Board for use with the entire Apalis Product Family)

  2. Apalis iMX6Q 2GB IT V1.1B (Embedded Computer Module, MXM Form Factor)

  3. repo init -u http://git.toradex.com/toradex-bsp-platform.git -b LinuxImageV2.7

I’ve tried:

  1. “bitbake -c clean angstrom-qt5-x11-image” and it doesn’t help (helped once, but when I rebuild once again, build is back to non-operational state)

  2. Add new user “test” and add it to sudoers list, still cannot log to the board.

I have also removed some recipes and added one layer (meta-qt5-extra), so that image becomes smaller, is it possible the login issue to come from that?

Which recipes are involved in user login?

There is certainly /etc/passwd and /etc/shadow which contain the actual user database. I would check in the built rootfs whether the user ended up being in this file.

Also /etc/securetty must exist and contain the serial terminal in order to be able to login.

How do you try to login? On the terminal or over SSH?

Removing some recipes can have side effects, I recommend to start from regular image, add the user there, make sure you can login and then start removing recipes.

Hi Stefan,

Thanks for the information. I’m trying to login over SSH.

I have already checked those files. Here is an extract:

Apalis-iMX6_Qt5-X11-Image_2.7.3/rootfs$ cat etc/passwd | grep test
test:x:1200:996::/home/test:/bin/bash

Apalis-iMX6_Qt5-X11-Image_2.7.3/rootfs$ cat etc/shadow | grep test
test:test:17381:0:99999:7:::

Apalis-iMX6_Qt5-X11-Image_2.7.3/rootfs$ cat etc/securetty | grep USB

# USB dongles

ttyUSB0

ttyUSB1

ttyUSB2

# USB serial gadget

I will now try to start from the very beginning without excluding recipes/layers.

Do you know any specific recipe that might be related to login?