We have a server infrastructure which has hundreds of servers. All those servers are accessed through a key server. We have centralize to mange authentications.
So what I tried is I used this bash command in our key server to list all users in the group:
adquery group GROUP_NAME -a
And I used this result in the following python script to read the output and get it in to a variable called users
:
users = os.popen("adquery group GROUP_NAME -a").read()
The problem I have is that when the script is run two three times it works fine and suddenly the command gives an empty output. And when I try to run the same command in the Linux prompt it still fails. But after some time. Again when I try to run it it works. For now I didn't even get a pattern on how this is happening. But when this happen anyone who has access to that server cannot get the results as for me.
Note - Update. One more thing to add.
When I try to query other things like
adquery user USERNAME -a
They still work. It gives the output with no issue. But the command i mentioned before still fails with no error no output.
Can some one explain me why this is happening.