Yocto Kirkstone - 第一次构建时的 systemd_create_users 问题

问题描述 投票:0回答:2

我第一次为 边界设备 imx8mm 构建 yocto kirkstone(之前构建过 dunfell)。所有食谱都构建得很好,但在 rootfs 过程的后期,我在 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

我没有修改systemd_create_users()函数,并且它从中提取用户的*.conf文件也没有被我修改。我也找不到任何对 SYSLOG_SU_ENAB 的引用,这似乎是问题的症结所在。

有什么想法吗?

embedded-linux yocto systemd
2个回答
1
投票

我解决了这个问题。虽然不清楚到底发生了什么,但似乎我在多个食谱中都有用户创建和修改条目。我删除了所有这些并成功构建了。

然后我将 USERADD_PARAM 和 GROUPADD_PARAM 定义重新添加到一个配方中,它也成功构建了。

然后我将 EXTRA_USERS_PARAMS 移至层配置,这是必须实现的地方。


0
投票

我正在看同样的问题。但我似乎无法掌握您提供的解决方案。当您提到发生的多个用户创建时,您能否详细说明一下?在您自己的自定义图层或狭小的图层中? @克利福德

© www.soinside.com 2019 - 2024. All rights reserved.