docs: protected void internalCreateDefaultGroups(CmsDbContext dbc, String ouFqn, String ouDescription, boolean webuser)
      throws CmsException {
  
          // create roles
          String rootAdminRole = CmsRole.ROOT_ADMIN.getGroupName();
          boolean isRootOu = CmsOrganizationalUnit.getParentFqn(ouFqn) == null;
          try {
              for (CmsRole role : CmsRole.getSystemRoles()) {
                  if (webuser && (role != CmsRole.ACCOUNT_MANAGER)) {
                      // if webuser ou and not account manager role
                      continue;
                  }
                  if (role.isOrganizationalUnitIndependent() && !isRootOu) {
                      // if role is ou independent and not in the root ou
                      continue;
                  }
                  String groupName = ouFqn + role.getGroupName();
                  int flags = I_CmsPrincipal.FLAG_ENABLED | I_CmsPrincipal.FLAG_GROUP_ROLE;
                  if (!existsGroup(dbc, groupName)) {
                      createGroup(dbc, CmsUUID.getConstantUUID(groupName), groupName, "A system role group", flags, null);
                  }
              }
              if (isRootOu && CmsLog.INIT.isInfoEnabled()) {
                  CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_SYSTEM_ROLES_CREATED_0));
              }
          } catch (CmsException e) {
              if (isRootOu && CmsLog.INIT.isErrorEnabled()) {
                  CmsLog.INIT.error(Messages.get().getBundle().key(Messages.INIT_SYSTEM_ROLES_CREATION_FAILED_0), e);
              }
              throw new CmsInitException(Messages.get().container(Messages.ERR_INITIALIZING_USER_DRIVER_0), e);
          }
  
          if (dbc.getAttribute(CmsDriverManager.ATTR_INIT_OU) != null) {
              return;
          }
  
          if (webuser) {
              // no default groups for webuser ou
              return;
          }
  
          // create groups
          String administratorsGroup = ouFqn + OpenCms.getDefaultUsers().getGroupAdministrators();
          String guestGroup = ouFqn + OpenCms.getDefaultUsers().getGroupGuests();
          String usersGroup = ouFqn + OpenCms.getDefaultUsers().getGroupUsers();
          String guestUser = ouFqn + OpenCms.getDefaultUsers().getUserGuest();
          String adminUser = ouFqn + OpenCms.getDefaultUsers().getUserAdmin();
          String exportUser = ouFqn + OpenCms.getDefaultUsers().getUserExport();
          String deleteUser = ouFqn + OpenCms.getDefaultUsers().getUserDeletedResource();
  
          if (existsGroup(dbc, administratorsGroup)) {
              if (isRootOu) {
                  // check the flags of existing groups, for compatibility checks
                  internalUpdateRoleGroup(dbc, administratorsGroup, CmsRole.ROOT_ADMIN);
                  internalUpdateRoleGroup(dbc, usersGroup, CmsRole.ELEMENT_AUTHOR.forOrgUnit(ouFqn));
              }
              return;
          }
          String parentOu = CmsOrganizationalUnit.getParentFqn(ouFqn);
          String groupDescription = (CmsStringUtil.isNotEmptyOrWhitespaceOnly(ouDescription)
          ? CmsMacroResolver.localizedKeyMacro(
              Messages.GUI_DEFAULTGROUP_OU_USERS_DESCRIPTION_1,
              new String[] {ouDescription})
          : CmsMacroResolver.localizedKeyMacro(Messages.GUI_DEFAULTGROUP_ROOT_USERS_DESCRIPTION_0, null));
          createGroup(
              dbc,
              CmsUUID.getConstantUUID(usersGroup),
              usersGroup,
              groupDescription,
              I_CmsPrincipal.FLAG_ENABLED | CmsRole.ELEMENT_AUTHOR.getVirtualGroupFlags(),
              null);
  
          if (parentOu != null) {
              // default users/groups(except the users group) are only for the root ou
              return;
          }
  
          CmsGroup guests = createGroup(
              dbc,
              CmsUUID.getConstantUUID(guestGroup),
              guestGroup,
              CmsMacroResolver.localizedKeyMacro(Messages.GUI_DEFAULTGROUP_ROOT_GUESTS_DESCRIPTION_0, null),
              I_CmsPrincipal.FLAG_ENABLED,
              null);
  
          int flags = CmsRole.ROOT_ADMIN.getVirtualGroupFlags();
          createGroup(
              dbc,
              CmsUUID.getConstantUUID(administratorsGroup),
              administratorsGroup,
              CmsMacroResolver.localizedKeyMacro(Messages.GUI_DEFAULTGROUP_ROOT_ADMINS_DESCRIPTION_0, null),
              I_CmsPrincipal.FLAG_ENABLED | flags,
              null);
  
          CmsUser guest = createUser(
              dbc,
              CmsUUID.getConstantUUID(guestUser),
              guestUser,
              OpenCms.getPasswordHandler().digest((new CmsUUID()).toString()),
              " ",
              " ",
              " ",
              0,
              I_CmsPrincipal.FLAG_ENABLED,
              0,
              Collections.singletonMap(
                  CmsUserSettings.ADDITIONAL_INFO_DESCRIPTION,
                  (Object)CmsMacroResolver.localizedKeyMacro(Messages.GUI_DEFAULTUSER_ROOT_GUEST_DESCRIPTION_0, null)));
          createUserInGroup(dbc, guest.getId(), guests.getId());
  
          CmsUser admin = createUser(
              dbc,
              CmsUUID.getConstantUUID(adminUser),
              adminUser,
              OpenCms.getPasswordHandler().digest("admin"),
              " ",
              " ",
              " ",
              0,
              I_CmsPrincipal.FLAG_ENABLED,
              0,
              Collections.singletonMap(
                  CmsUserSettings.ADDITIONAL_INFO_DESCRIPTION,
                  (Object)CmsMacroResolver.localizedKeyMacro(Messages.GUI_DEFAULTUSER_ROOT_ADMIN_DESCRIPTION_0, null)));
          createUserInGroup(dbc, admin.getId(), CmsUUID.getConstantUUID(CmsRole.ROOT_ADMIN.getGroupName()));
          createUserInGroup(dbc, admin.getId(), CmsUUID.getConstantUUID(administratorsGroup));
  
          if (!OpenCms.getDefaultUsers().getUserExport().equals(OpenCms.getDefaultUsers().getUserAdmin())
              && !OpenCms.getDefaultUsers().getUserExport().equals(OpenCms.getDefaultUsers().getUserGuest())) {
  
              CmsUser export = createUser(
                  dbc,
                  CmsUUID.getConstantUUID(exportUser),
                  exportUser,
                  OpenCms.getPasswordHandler().digest((new CmsUUID()).toString()),
                  " ",
                  " ",
                  " ",
                  0,
                  I_CmsPrincipal.FLAG_ENABLED,
                  0,
                  Collections.singletonMap(
                      CmsUserSettings.ADDITIONAL_INFO_DESCRIPTION,
                      (Object)CmsMacroResolver.localizedKeyMacro(
                          Messages.GUI_DEFAULTUSER_ROOT_EXPORT_DESCRIPTION_0,
                          null)));
              createUserInGroup(dbc, export.getId(), guests.getId());
          }
  
          if (!OpenCms.getDefaultUsers().getUserDeletedResource().equals(OpenCms.getDefaultUsers().getUserAdmin())
              && !OpenCms.getDefaultUsers().getUserDeletedResource().equals(OpenCms.getDefaultUsers().getUserGuest())
              && !OpenCms.getDefaultUsers().getUserDeletedResource().equals(OpenCms.getDefaultUsers().getUserExport())) {
  
              createUser(
                  dbc,
                  CmsUUID.getConstantUUID(deleteUser),
                  deleteUser,
                  OpenCms.getPasswordHandler().digest((new CmsUUID()).toString()),
                  " ",
                  " ",
                  " ",
                  0,
                  I_CmsPrincipal.FLAG_ENABLED,
                  0,
                  Collections.singletonMap(
                      CmsUserSettings.ADDITIONAL_INFO_DESCRIPTION,
                      (Object)CmsMacroResolver.localizedKeyMacro(
                          Messages.GUI_DEFAULTUSER_ROOT_DELETED_DESCRIPTION_0,
                          null)));
          }
  
          if (CmsLog.INIT.isInfoEnabled()) {
              CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_DEFAULT_USERS_CREATED_0));
          }
      }