Can not modify mongod configuration

I want to edit mongod configuration file, because i have problem regarding to connect cluster
i have to edit
security: authorization: enabled
keyFile: /var/run/mongodb/secKey.key
but i dont have access to edit it? any ideas how to fix it?

  • Login to the node:
    mongo --host <hostname>:<port> -u <username> -p <password> --authenticationDatabase admin
  • Shutdown the server (as long as this is not in production, don’t worry whether it’s a Primary or Secondary):
    use admin
  • Edit the config file and restart the mongod

By the way, was this not mentioned anywhere within the course?

Hi @Nana_08979,

I am not sure which configuration file you are referring to because in M001 course we do not really talk about working directly with the configuration file.

Is it a follow up on this problem which you have mentioned in this thread ?

Shubham Ranjan
Curriculum Support Engineer