MongoDB Documentation, Release 3.0.4 For example, the following starts a mongos instance with Kerberos support: env KRB5_KTNAME=/opt/mongodb/mongos.keytab \ mongos \ --setParameter authenticationMechanisms=GSSAPI \ --configdb shard0.example.net, shard1.example.net,shard2.example.net \ --keyFile /opt/mongodb/mongos.keyfile security: authorization: enabled setParameter: authenticationMechanisms: GSSAPI storage: dbPath: /opt/mongodb/data auth = true setParameter=authenticationMechanisms=GSSAPI dbpath=/opt/mongodb/data The path to your mongod , keytab file (page 332), and configuration file may differ. The keytab file (page 332) must be only accessible to the owner of the mongod process. Troubleshoot Kerberos Setup for MongoDB If you encounter problems when starting mongod or mongos with Kerberos authentication, see Troubleshoot Kerberos Authentication on Linux (page 380). To start mongod with Kerberos support, use the following form: env KRB5_KTNAME=/opt/mongodb/mongod.keytab \ /opt/mongodb/bin/mongod --config /opt/mongodb/mongod.conf Or, if using the older configuration file format$^{63}$: Modify or include any additional mongod options as required for your configuration. For example, if /opt/mongodb/mongod.conf contains the following configuration settings for a standalone mongod : setParameter=authenticationMechanisms=GSSAPI Or, if using the older .ini configuration file format: setParameter: authenticationMechanisms: GSSAPI Use a Config File To configure mongod or mongos for Kerberos support using a configuration file , specify the authenticationMechanisms setting in the configuration file: If using the YAML configuration file format : Modify or include any additional mongos options as required for your configuration. For example, instead of us- ing --keyFile for internal authentication of sharded cluster members, you can use x.509 member authentication (page 363) instead. The path to your mongos as well as your keytab file (page 332) may differ. The keytab file (page 332) must be only accessible to the owner of the mongos process. $^{63}$http://docs.mongodb.org/v2.4/reference/configuration-options 375 6.3. Security Tutorials