Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bib doesn't support user group 'admins' #628

Open
chunfuwen opened this issue Sep 2, 2024 · 0 comments
Open

bib doesn't support user group 'admins' #628

chunfuwen opened this issue Sep 2, 2024 · 0 comments

Comments

@chunfuwen
Copy link

use below command to build image with config file
[root@dell-per430-17 images]# cat config.json
{"blueprint": {"customizations": {"user": [{"name": "alice", "password": "bob", "groups": ["wheel", "admins"], "key": "ssh-rsa xx}

sudo podman run --rm -it --privileged --pull=newer --security-opt label=type:unconfined_t -v /var/lib/libvirt/images/output:/output -v /var/lib/libvirt/images/config.json:/config.json   -v /var/lib/containers/storage:/var/lib/containers/storage  -v /var/lib/libvirt/images/auth.json:/run/containers/0/auth.json  quay.io/centos-bootc/bootc-image-builder:latest  --type qcow2 --tls-verify=true  --config /config.json quay.io/centos-bootc/centos-bootc:stream9

and throw below error:

mount/boot-efi (org.osbuild.fat): mounting /dev/loop0p2 -> /store/tmp/buildroot-tmp-f25k4kft/mounts/boot/efi
mount/ostree.deployment (org.osbuild.ostree.deployment): Deployment root at 'ostree/deploy/default/deploy/947c0ed4b66c676a76028d6137dc1e40fefb3c70b0ebee1c1b4e20e368da5ab1.0'
useradd: group 'admins' does not exist
Traceback (most recent call last):
  File "/run/osbuild/bin/org.osbuild.users", line 145, in <module>
    r = main(args["tree"], args["options"])
  File "/run/osbuild/bin/org.osbuild.users", line 127, in main
    useradd(tree, name, uid, gid, groups, description, home, shell, password, expiredate)
  File "/run/osbuild/bin/org.osbuild.users", line 51, in useradd
    subprocess.run(["chroot", root, "useradd", *arguments, name], check=True)
  File "/usr/lib64/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['chroot', '/run/osbuild/tree', 'useradd', '--groups', 'wheel,admins', '--password', '$6$ya/k4WheW48hwozk$d67B1.n3Sb5WObyeY1ap2vz55jOcwenjGY5Rtx9jFeRv4JBTmDhbJ.kCGh3Xsa9GHKDnZTPf..YKtKhcGg98Y0', 'alice']' returned non-zero exit status 6.

As per web page https://github.com/osbuild/bootc-image-builder , it give one example with group:admins

{
  "customizations": {
    "user": [
      {
        "name": "alice",
        "password": "bob",
        "key": "ssh-rsa AAA ... [email protected]",
        "groups": [
          "wheel",
          "admins"
        ]
      }
    ]
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant