code: private static long getIdInfo(String option, String username) {
      String output;
      try {
        output = ShellUtils.execCommand("id", option, username).trim();
      } catch (IOException e) {
        LOG.error("Failed to get id from {} with option {}", username, option);
        return -1;
      }
      return Long.parseLong(output);
    }
docs: Runs the "id" command with the given options on the passed username.
  
  @param option option to pass to id (either -u or -g)
  @param username the username on which to run the command
  @return the uid (-u) or gid (-g) of username