Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yocto Kirkstone - systemd_create_users issue on first build

I'm building yocto kirkstone for the first time (previously built dunfell) for the boundary devices imx8mm. All the recipes build fine, but late in the rootfs process, I get the following errors in log.do_rootfs.xxx :

NOTE: Executing systemd_create_users ...
DEBUG: Executing shell function systemd_create_users
configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
Usage: useradd [options] LOGIN
       useradd -D
       useradd -D [options]

Options:
      --badnames                do not check for bad names
  -b, --base-dir BASE_DIR       base directory for the home directory of the
                                new account
      --btrfs-subvolume-home    use BTRFS subvolume for home directory
  -c, --comment COMMENT         GECOS field of the new account
  -d, --home-dir HOME_DIR       home directory of the new account
  -D, --defaults                print or change default useradd configuration
  -e, --expiredate EXPIRE_DATE  expiration date of the new account
  -f, --inactive INACTIVE       password inactivity period of the new account
  -g, --gid GROUP               name or ID of the primary group of the new
                                account
  -G, --groups GROUPS           list of supplementary groups of the new
                                account
  -h, --help                    display this help message and exit
  -k, --skel SKEL_DIR           use this alternative skeleton directory
  -K, --key KEY=VALUE           override /etc/login.defs defaults
  -l, --no-log-init             do not add the user to the lastlog and
                                faillog databases
  -m, --create-home             create the user's home directory
  -M, --no-create-home          do not create the user's home directory
  -N, --no-user-group           do not create a group with the same name as
                                the user
  -o, --non-unique              allow to create users with duplicate
                                (non-unique) UID
  -p, --password PASSWORD       encrypted password of the new account
  -r, --system                  create a system account
  -R, --root CHROOT_DIR         directory to chroot into
  -P, --prefix PREFIX_DIR       prefix directory where are located the /etc/* files
  -s, --shell SHELL             login shell of the new account
  -u, --uid UID                 user ID of the new account
  -U, --user-group              create a group with the same name as the user

    groupadd: GID '65534' already exists
    configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
    configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
    useradd: invalid user ID '65534:65534'
    groupadd: group 'adm' already exists
    configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
    configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
    groupadd: group 'utmp' already exists
    groupadd: group 'audio' already exists
    groupadd: group 'cdrom' already exists
    groupadd: group 'dialout' already exists
    groupadd: group 'disk' already exists
    groupadd: group 'input' already exists
    groupadd: group 'kmem' already exists
    groupadd: group 'kvm' already exists
    groupadd: group 'lp' already exists
    configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
    configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
    configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
    configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
    groupadd: group 'tape' already exists
    groupadd: group 'tty' already exists
    groupadd: group 'video' already exists
    groupadd: group 'users' already exists
    configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
    configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
    useradd: user 'messagebus' already exists
    groupadd: group 'systemd-journal' already exists
    configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
    configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
    useradd: user 'systemd-network' already exists
    configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
    configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
    useradd: user 'systemd-resolve' already exists
    configuration error - unknown item 'SYSLOG_SU_ENAB' (notify administrator)
    configuration error - unknown item 'SYSLOG_SG_ENAB' (notify administrator)
    useradd: user 'systemd-timesync' already exists
    DEBUG: Shell function systemd_create_users finished

I haven't modified the systemd_create_users() function, and the *.conf files from which it pulls users have not been modified by me. I also cannot find any reference to SYSLOG_SU_ENAB, which seems to be the crux of the issue here.

Any thoughts?

like image 324
Kile Avatar asked Sep 16 '25 11:09

Kile


1 Answers

I solved this. While it's not clear what happened exactly, it seems I had user-creation and modification entries in multiple recipes. I removed all of these and it built successfully.

Then I re-added the USERADD_PARAM and GROUPADD_PARAM definitions to one recipe and it also built successfully.

I then moved the EXTRA_USERS_PARAMS to the layer configuration, which is where this must be implemented.

like image 169
Kile Avatar answered Sep 19 '25 08:09

Kile