From a Spark job which is written in Java, I am trying to get the list of all the linux/centos users who have access to a particular hdfs file.
Currently tring out below Java code to get the info:
result = Shell.execCommand("sudo","bash","-c","lid","-g","-n", fileOwnersGroup);
but it is not working out. It is throwing:
sudo: no tty present and no askpass program specified
Tried various option including updating /etc/sudoer but no luck.