rs.stepDown() permission

I’m trying to run rs.stepDown(60) but I’m getting this error:

MongoServerError: not authorized on admin to execute command

What permission do I need to add to my user to be able to run stepDown?

Hi @Mark_De_May

You need replSetStateChange privilege, which is allowed in clusterAdmin or clusterManager roles.

Best regards

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.