Uploaded image for project: 'Insights Experiences'
  1. Insights Experiences
  2. HMS-9933

[BUG] Groups validation should exclude a user's group

    • Icon: Task Task
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • Image Builder
    • None

      *Bug description*
      The useradd command will fail when creating a user and explicitly adding the user to a group of the same name.
      E.g. `useradd --groups 'wheel,myuser' --password '123456' myuser` will fail with exit status 6, because the 'myuser' group does not exist.

      Hence we need to validate this in the frontend (and ideally on the image-builder-crc API layer, too) and not allow adding a group with the same name as the user.

      *Reproduction steps*
      Steps to reproduce the behavior:
      1. Go to the service and create a blueprint
      2. In the user step, add a user and add a group with the same name
      3. Go to review
      4. Build
      5. Observe that the build will fail

      *Expected behavior*
      We should not allow customers to add a group that doesn't exist, in this case the group with the name of the newly-created user.

      GitHub Issue: https://github.com/osbuild/image-builder-frontend/issues/3932

              ssteinbe@redhat.com Simon Steinbeiss
              imagebuilder-bot Image-Builder Bot
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: