String[] groups = null;
ExtendedFile tmpFile = null;
try {
String command = "groups";
FsTypeCommand groupCmd = new FsTypeCommand(host, DEF_CONNECT_USER, shell, IS_MODE_WINDOWS, command, userToCheck);
groupCmd.execute();
if (groupCmd.getExitValue() == EXIT_VAL_SUCCESS) {
groups = groupCmd.getOutput().firstElement().trim().split(" ");
Debug.trace("Group of user '" + userToCheck + "' are '" + Arrays.toString(groups) + "'.");
} else {
Debug.error("Failed to get the group id's of user '" + userToCheck + "'! Error: " + groupCmd.getError());
}
} catch (Exception ex) {
Debug.error("Failed to get the group id's of user '" + userToCheck + "'! " + ex);
}