How to Execute Command As Another User in Linux
If you have a script or a command to execute in another user, assume that the Hadoop command to execute in Hadoop user from any users, use the below commands,
$ su -s /bin/bash - hadoop -c 'hadoop dfsadmin -report'
$ runuser -l hadoop -c 'hadoop dfsadmin -report'
You will get the Hadoop report.