MongoDB - temporarily turn shard to standalone for local user creation
If you comment out keyFile (assuming you have not specified auth explicitly) you will turn off authentication.  Basically keyFile implies auth but not the other way around.

When you comment out shardsvr, the port will change from 27018 to the default port number - 27017.  That is actually a good thing.  When you take a node out of a replica set or a sharded cluster you want to change the port so that the rest of the set/cluster does not attempt to continue to communicate with the node you are working on.  Then, once you restore the original configuration, it will rejoin the set and cluster as normal.

Although the port will change when you do this, I tend to prefer explicitly specifying the port number to use for maintenance (30000 is my preference) rather than rely on default settings.  Also, I tend to have plenty of instances running on my hosts, so 27017 may well already be in use.

Once you have made your changes, all you have to do to restore the node in question is restart and switch back to your original settings.  This should be a relatively quick maintenance, so you should not have to worry about a node going stale (can be a concern with prolonged work).