Description
Currently in the Ranger usersync code for UnixUserSync the enumerate group option accepts group as comma separated values.
Example:
ranger.usersync.group.enumerate: true
ranger.usersync.group.enumerategroup: test_group1,test_group2
However in the code
ugsync/src/main/java/org/apache/ranger/process
UnixUserGroupBuilder.java -> buildUnixGroupList()
when enumerateGroups is set, the line:
String[] cmd = new String[] {"bash", "-c", command + " '" + group + "'"};
will create the command as:
bash -c getent group <group_name> '<group_name>'
bash -c getent group test_group1 'test_group1'
which is an invalid command as getent takes one argument.
This will return an exit-code 2 with error.